false
true
0

Contract Address Details

0xE41680f17417714CB77bc953D962cEc3f42cB6eb

Contract Name
NukeTheSupply
Creator
0x915b41–22723c at 0x742cec–615d60
Balance
0 PLS ( )
Tokens
Fetching tokens...
Transactions
2,382 Transactions
Transfers
0 Transfers
Gas Used
245,772,907
Last Balance Update
25916424
Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
Contract name:
NukeTheSupply




Optimization enabled
false
Compiler version
v0.8.20+commit.a1b79de6




EVM Version
shanghai




Verified at
2025-05-16T21:07:05.663145Z

Constructor Arguments

0x000000000000000000000000915b4145e169ce7352936e88546ac8667d22723c

Arg [0] (address) : 0x915b4145e169ce7352936e88546ac8667d22723c

              

Contract source code

// File: @openzeppelin/contracts/token/ERC20/IERC20.sol


// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC-20 standard as defined in the ERC.
 */
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 value of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

    /**
     * @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens 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 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the
     * allowance mechanism. `value` 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 value) external returns (bool);
}

// File: @openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol


// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.20;


/**
 * @dev Interface for the optional metadata functions from the ERC-20 standard.
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

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

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

// File: @openzeppelin/contracts/utils/Context.sol


// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;

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

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

// File: @openzeppelin/contracts/interfaces/draft-IERC6093.sol


// OpenZeppelin Contracts (last updated v5.1.0) (interfaces/draft-IERC6093.sol)
pragma solidity ^0.8.20;

/**
 * @dev Standard ERC-20 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-20 tokens.
 */
interface IERC20Errors {
    /**
     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param balance Current balance for the interacting account.
     * @param needed Minimum amount required to perform a transfer.
     */
    error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC20InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC20InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.
     * @param spender Address that may be allowed to operate on tokens without being their owner.
     * @param allowance Amount of tokens a `spender` is allowed to operate with.
     * @param needed Minimum amount required to perform a transfer.
     */
    error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC20InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `spender` to be approved. Used in approvals.
     * @param spender Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC20InvalidSpender(address spender);
}

/**
 * @dev Standard ERC-721 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-721 tokens.
 */
interface IERC721Errors {
    /**
     * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in ERC-20.
     * Used in balance queries.
     * @param owner Address of the current owner of a token.
     */
    error ERC721InvalidOwner(address owner);

    /**
     * @dev Indicates a `tokenId` whose `owner` is the zero address.
     * @param tokenId Identifier number of a token.
     */
    error ERC721NonexistentToken(uint256 tokenId);

    /**
     * @dev Indicates an error related to the ownership over a particular token. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param tokenId Identifier number of a token.
     * @param owner Address of the current owner of a token.
     */
    error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC721InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC721InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `operator`’s approval. Used in transfers.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     * @param tokenId Identifier number of a token.
     */
    error ERC721InsufficientApproval(address operator, uint256 tokenId);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC721InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `operator` to be approved. Used in approvals.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC721InvalidOperator(address operator);
}

/**
 * @dev Standard ERC-1155 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-1155 tokens.
 */
interface IERC1155Errors {
    /**
     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param balance Current balance for the interacting account.
     * @param needed Minimum amount required to perform a transfer.
     * @param tokenId Identifier number of a token.
     */
    error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC1155InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC1155InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `operator`’s approval. Used in transfers.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     * @param owner Address of the current owner of a token.
     */
    error ERC1155MissingApprovalForAll(address operator, address owner);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC1155InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `operator` to be approved. Used in approvals.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC1155InvalidOperator(address operator);

    /**
     * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.
     * Used in batch transfers.
     * @param idsLength Length of the array of token identifiers
     * @param valuesLength Length of the array of token amounts
     */
    error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);
}

// File: @openzeppelin/contracts/token/ERC20/ERC20.sol


// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.20;





/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * The default value of {decimals} is 18. To change this, you should override
 * this function so it returns a different value.
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC-20
 * applications.
 */
abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {
    mapping(address account => uint256) private _balances;

    mapping(address account => mapping(address spender => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * Both values are immutable: they can only be set once during construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the default value returned by this function, unless
     * it's overridden.
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual returns (uint8) {
        return 18;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - the caller must have a balance of at least `value`.
     */
    function transfer(address to, uint256 value) public virtual returns (bool) {
        address owner = _msgSender();
        _transfer(owner, to, value);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 value) public virtual returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, value);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Skips emitting an {Approval} event indicating an allowance update. This is not
     * required by the ERC. See {xref-ERC20-_approve-address-address-uint256-bool-}[_approve].
     *
     * NOTE: Does not update the allowance if the current allowance
     * is the maximum `uint256`.
     *
     * Requirements:
     *
     * - `from` and `to` cannot be the zero address.
     * - `from` must have a balance of at least `value`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `value`.
     */
    function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, value);
        _transfer(from, to, value);
        return true;
    }

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * NOTE: This function is not virtual, {_update} should be overridden instead.
     */
    function _transfer(address from, address to, uint256 value) internal {
        if (from == address(0)) {
            revert ERC20InvalidSender(address(0));
        }
        if (to == address(0)) {
            revert ERC20InvalidReceiver(address(0));
        }
        _update(from, to, value);
    }

    /**
     * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`
     * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding
     * this function.
     *
     * Emits a {Transfer} event.
     */
    function _update(address from, address to, uint256 value) internal virtual {
        if (from == address(0)) {
            // Overflow check required: The rest of the code assumes that totalSupply never overflows
            _totalSupply += value;
        } else {
            uint256 fromBalance = _balances[from];
            if (fromBalance < value) {
                revert ERC20InsufficientBalance(from, fromBalance, value);
            }
            unchecked {
                // Overflow not possible: value <= fromBalance <= totalSupply.
                _balances[from] = fromBalance - value;
            }
        }

        if (to == address(0)) {
            unchecked {
                // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.
                _totalSupply -= value;
            }
        } else {
            unchecked {
                // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.
                _balances[to] += value;
            }
        }

        emit Transfer(from, to, value);
    }

    /**
     * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).
     * Relies on the `_update` mechanism
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * NOTE: This function is not virtual, {_update} should be overridden instead.
     */
    function _mint(address account, uint256 value) internal {
        if (account == address(0)) {
            revert ERC20InvalidReceiver(address(0));
        }
        _update(address(0), account, value);
    }

    /**
     * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.
     * Relies on the `_update` mechanism.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * NOTE: This function is not virtual, {_update} should be overridden instead
     */
    function _burn(address account, uint256 value) internal {
        if (account == address(0)) {
            revert ERC20InvalidSender(address(0));
        }
        _update(account, address(0), value);
    }

    /**
     * @dev Sets `value` as the allowance of `spender` over the `owner`'s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     *
     * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.
     */
    function _approve(address owner, address spender, uint256 value) internal {
        _approve(owner, spender, value, true);
    }

    /**
     * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.
     *
     * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by
     * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any
     * `Approval` event during `transferFrom` operations.
     *
     * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to
     * true using the following override:
     *
     * ```solidity
     * function _approve(address owner, address spender, uint256 value, bool) internal virtual override {
     *     super._approve(owner, spender, value, true);
     * }
     * ```
     *
     * Requirements are the same as {_approve}.
     */
    function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {
        if (owner == address(0)) {
            revert ERC20InvalidApprover(address(0));
        }
        if (spender == address(0)) {
            revert ERC20InvalidSpender(address(0));
        }
        _allowances[owner][spender] = value;
        if (emitEvent) {
            emit Approval(owner, spender, value);
        }
    }

    /**
     * @dev Updates `owner`'s allowance for `spender` based on spent `value`.
     *
     * Does not update the allowance value in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Does not emit an {Approval} event.
     */
    function _spendAllowance(address owner, address spender, uint256 value) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance < type(uint256).max) {
            if (currentAllowance < value) {
                revert ERC20InsufficientAllowance(spender, currentAllowance, value);
            }
            unchecked {
                _approve(owner, spender, currentAllowance - value, false);
            }
        }
    }
}

// File: @openzeppelin/contracts/interfaces/IERC20.sol


// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol)

pragma solidity ^0.8.20;


// File: @openzeppelin/contracts/utils/introspection/IERC165.sol


// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC-165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[ERC].
 *
 * 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[ERC 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: @openzeppelin/contracts/interfaces/IERC165.sol


// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC165.sol)

pragma solidity ^0.8.20;


// File: @openzeppelin/contracts/interfaces/IERC1363.sol


// OpenZeppelin Contracts (last updated v5.1.0) (interfaces/IERC1363.sol)

pragma solidity ^0.8.20;



/**
 * @title IERC1363
 * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].
 *
 * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract
 * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.
 */
interface IERC1363 is IERC20, IERC165 {
    /*
     * Note: the ERC-165 identifier for this interface is 0xb0202a11.
     * 0xb0202a11 ===
     *   bytes4(keccak256('transferAndCall(address,uint256)')) ^
     *   bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^
     *   bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^
     *   bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^
     *   bytes4(keccak256('approveAndCall(address,uint256)')) ^
     *   bytes4(keccak256('approveAndCall(address,uint256,bytes)'))
     */

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferAndCall(address to, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @param data Additional data with no specified format, sent in call to `to`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param from The address which you want to send tokens from.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferFromAndCall(address from, address to, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param from The address which you want to send tokens from.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @param data Additional data with no specified format, sent in call to `to`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
     * @param spender The address which will spend the funds.
     * @param value The amount of tokens to be spent.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function approveAndCall(address spender, uint256 value) external returns (bool);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
     * @param spender The address which will spend the funds.
     * @param value The amount of tokens to be spent.
     * @param data Additional data with no specified format, sent in call to `spender`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);
}

// File: @openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol


// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.20;



/**
 * @title SafeERC20
 * @dev Wrappers around ERC-20 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 {
    /**
     * @dev An operation with an ERC-20 token failed.
     */
    error SafeERC20FailedOperation(address token);

    /**
     * @dev Indicates a failed `decreaseAllowance` request.
     */
    error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);

    /**
     * @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.encodeCall(token.transfer, (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.encodeCall(token.transferFrom, (from, to, value)));
    }

    /**
     * @dev Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.
     */
    function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {
        return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));
    }

    /**
     * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.
     */
    function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {
        return _callOptionalReturnBool(token, abi.encodeCall(token.transferFrom, (from, to, 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.
     *
     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
     * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
     */
    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 oldAllowance = token.allowance(address(this), spender);
        forceApprove(token, spender, oldAllowance + value);
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no
     * value, non-reverting calls are assumed to be successful.
     *
     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
     * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
     */
    function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {
        unchecked {
            uint256 currentAllowance = token.allowance(address(this), spender);
            if (currentAllowance < requestedDecrease) {
                revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);
            }
            forceApprove(token, spender, currentAllowance - requestedDecrease);
        }
    }

    /**
     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
     * to be set to zero before setting it to a non-zero value, such as USDT.
     *
     * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function
     * only sets the "standard" allowance. Any temporary allowance will remain active, in addition to the value being
     * set here.
     */
    function forceApprove(IERC20 token, address spender, uint256 value) internal {
        bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));

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

    /**
     * @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no
     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * Reverts if the returned value is other than `true`.
     */
    function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
        if (to.code.length == 0) {
            safeTransfer(token, to, value);
        } else if (!token.transferAndCall(to, value, data)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target
     * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * Reverts if the returned value is other than `true`.
     */
    function transferFromAndCallRelaxed(
        IERC1363 token,
        address from,
        address to,
        uint256 value,
        bytes memory data
    ) internal {
        if (to.code.length == 0) {
            safeTransferFrom(token, from, to, value);
        } else if (!token.transferFromAndCall(from, to, value, data)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no
     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.
     * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}
     * once without retrying, and relies on the returned value to be true.
     *
     * Reverts if the returned value is other than `true`.
     */
    function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
        if (to.code.length == 0) {
            forceApprove(token, to, value);
        } else if (!token.approveAndCall(to, value, data)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @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 {_callOptionalReturnBool} that reverts if call fails to meet the requirements.
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        uint256 returnSize;
        uint256 returnValue;
        assembly ("memory-safe") {
            let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
            // bubble errors
            if iszero(success) {
                let ptr := mload(0x40)
                returndatacopy(ptr, 0, returndatasize())
                revert(ptr, returndatasize())
            }
            returnSize := returndatasize()
            returnValue := mload(0)
        }

        if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @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 silently catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        bool success;
        uint256 returnSize;
        uint256 returnValue;
        assembly ("memory-safe") {
            success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
            returnSize := returndatasize()
            returnValue := mload(0)
        }
        return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);
    }
}

// File: @openzeppelin/contracts/access/Ownable.sol


// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.20;


/**
 * @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.
 *
 * The initial owner is set to the address provided by the deployer. 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;

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

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

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    constructor(address initialOwner) {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

    /**
     * @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 {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

    /**
     * @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 {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _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: @openzeppelin/contracts/utils/Panic.sol


// OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol)

pragma solidity ^0.8.20;

/**
 * @dev Helper library for emitting standardized panic codes.
 *
 * ```solidity
 * contract Example {
 *      using Panic for uint256;
 *
 *      // Use any of the declared internal constants
 *      function foo() { Panic.GENERIC.panic(); }
 *
 *      // Alternatively
 *      function foo() { Panic.panic(Panic.GENERIC); }
 * }
 * ```
 *
 * Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].
 *
 * _Available since v5.1._
 */
// slither-disable-next-line unused-state
library Panic {
    /// @dev generic / unspecified error
    uint256 internal constant GENERIC = 0x00;
    /// @dev used by the assert() builtin
    uint256 internal constant ASSERT = 0x01;
    /// @dev arithmetic underflow or overflow
    uint256 internal constant UNDER_OVERFLOW = 0x11;
    /// @dev division or modulo by zero
    uint256 internal constant DIVISION_BY_ZERO = 0x12;
    /// @dev enum conversion error
    uint256 internal constant ENUM_CONVERSION_ERROR = 0x21;
    /// @dev invalid encoding in storage
    uint256 internal constant STORAGE_ENCODING_ERROR = 0x22;
    /// @dev empty array pop
    uint256 internal constant EMPTY_ARRAY_POP = 0x31;
    /// @dev array out of bounds access
    uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32;
    /// @dev resource error (too large allocation or too large array)
    uint256 internal constant RESOURCE_ERROR = 0x41;
    /// @dev calling invalid internal function
    uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51;

    /// @dev Reverts with a panic code. Recommended to use with
    /// the internal constants with predefined codes.
    function panic(uint256 code) internal pure {
        assembly ("memory-safe") {
            mstore(0x00, 0x4e487b71)
            mstore(0x20, code)
            revert(0x1c, 0x24)
        }
    }
}

// File: @openzeppelin/contracts/utils/math/SafeCast.sol


// OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SafeCast.sol)
// This file was procedurally generated from scripts/generate/templates/SafeCast.js.

pragma solidity ^0.8.20;

/**
 * @dev Wrappers over Solidity's uintXX/intXX/bool casting operators with added overflow
 * checks.
 *
 * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can
 * easily result in undesired exploitation or bugs, since developers usually
 * assume that overflows raise errors. `SafeCast` restores this intuition by
 * reverting the transaction when such an operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeCast {
    /**
     * @dev Value doesn't fit in an uint of `bits` size.
     */
    error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value);

    /**
     * @dev An int value doesn't fit in an uint of `bits` size.
     */
    error SafeCastOverflowedIntToUint(int256 value);

    /**
     * @dev Value doesn't fit in an int of `bits` size.
     */
    error SafeCastOverflowedIntDowncast(uint8 bits, int256 value);

    /**
     * @dev An uint value doesn't fit in an int of `bits` size.
     */
    error SafeCastOverflowedUintToInt(uint256 value);

    /**
     * @dev Returns the downcasted uint248 from uint256, reverting on
     * overflow (when the input is greater than largest uint248).
     *
     * Counterpart to Solidity's `uint248` operator.
     *
     * Requirements:
     *
     * - input must fit into 248 bits
     */
    function toUint248(uint256 value) internal pure returns (uint248) {
        if (value > type(uint248).max) {
            revert SafeCastOverflowedUintDowncast(248, value);
        }
        return uint248(value);
    }

    /**
     * @dev Returns the downcasted uint240 from uint256, reverting on
     * overflow (when the input is greater than largest uint240).
     *
     * Counterpart to Solidity's `uint240` operator.
     *
     * Requirements:
     *
     * - input must fit into 240 bits
     */
    function toUint240(uint256 value) internal pure returns (uint240) {
        if (value > type(uint240).max) {
            revert SafeCastOverflowedUintDowncast(240, value);
        }
        return uint240(value);
    }

    /**
     * @dev Returns the downcasted uint232 from uint256, reverting on
     * overflow (when the input is greater than largest uint232).
     *
     * Counterpart to Solidity's `uint232` operator.
     *
     * Requirements:
     *
     * - input must fit into 232 bits
     */
    function toUint232(uint256 value) internal pure returns (uint232) {
        if (value > type(uint232).max) {
            revert SafeCastOverflowedUintDowncast(232, value);
        }
        return uint232(value);
    }

    /**
     * @dev Returns the downcasted uint224 from uint256, reverting on
     * overflow (when the input is greater than largest uint224).
     *
     * Counterpart to Solidity's `uint224` operator.
     *
     * Requirements:
     *
     * - input must fit into 224 bits
     */
    function toUint224(uint256 value) internal pure returns (uint224) {
        if (value > type(uint224).max) {
            revert SafeCastOverflowedUintDowncast(224, value);
        }
        return uint224(value);
    }

    /**
     * @dev Returns the downcasted uint216 from uint256, reverting on
     * overflow (when the input is greater than largest uint216).
     *
     * Counterpart to Solidity's `uint216` operator.
     *
     * Requirements:
     *
     * - input must fit into 216 bits
     */
    function toUint216(uint256 value) internal pure returns (uint216) {
        if (value > type(uint216).max) {
            revert SafeCastOverflowedUintDowncast(216, value);
        }
        return uint216(value);
    }

    /**
     * @dev Returns the downcasted uint208 from uint256, reverting on
     * overflow (when the input is greater than largest uint208).
     *
     * Counterpart to Solidity's `uint208` operator.
     *
     * Requirements:
     *
     * - input must fit into 208 bits
     */
    function toUint208(uint256 value) internal pure returns (uint208) {
        if (value > type(uint208).max) {
            revert SafeCastOverflowedUintDowncast(208, value);
        }
        return uint208(value);
    }

    /**
     * @dev Returns the downcasted uint200 from uint256, reverting on
     * overflow (when the input is greater than largest uint200).
     *
     * Counterpart to Solidity's `uint200` operator.
     *
     * Requirements:
     *
     * - input must fit into 200 bits
     */
    function toUint200(uint256 value) internal pure returns (uint200) {
        if (value > type(uint200).max) {
            revert SafeCastOverflowedUintDowncast(200, value);
        }
        return uint200(value);
    }

    /**
     * @dev Returns the downcasted uint192 from uint256, reverting on
     * overflow (when the input is greater than largest uint192).
     *
     * Counterpart to Solidity's `uint192` operator.
     *
     * Requirements:
     *
     * - input must fit into 192 bits
     */
    function toUint192(uint256 value) internal pure returns (uint192) {
        if (value > type(uint192).max) {
            revert SafeCastOverflowedUintDowncast(192, value);
        }
        return uint192(value);
    }

    /**
     * @dev Returns the downcasted uint184 from uint256, reverting on
     * overflow (when the input is greater than largest uint184).
     *
     * Counterpart to Solidity's `uint184` operator.
     *
     * Requirements:
     *
     * - input must fit into 184 bits
     */
    function toUint184(uint256 value) internal pure returns (uint184) {
        if (value > type(uint184).max) {
            revert SafeCastOverflowedUintDowncast(184, value);
        }
        return uint184(value);
    }

    /**
     * @dev Returns the downcasted uint176 from uint256, reverting on
     * overflow (when the input is greater than largest uint176).
     *
     * Counterpart to Solidity's `uint176` operator.
     *
     * Requirements:
     *
     * - input must fit into 176 bits
     */
    function toUint176(uint256 value) internal pure returns (uint176) {
        if (value > type(uint176).max) {
            revert SafeCastOverflowedUintDowncast(176, value);
        }
        return uint176(value);
    }

    /**
     * @dev Returns the downcasted uint168 from uint256, reverting on
     * overflow (when the input is greater than largest uint168).
     *
     * Counterpart to Solidity's `uint168` operator.
     *
     * Requirements:
     *
     * - input must fit into 168 bits
     */
    function toUint168(uint256 value) internal pure returns (uint168) {
        if (value > type(uint168).max) {
            revert SafeCastOverflowedUintDowncast(168, value);
        }
        return uint168(value);
    }

    /**
     * @dev Returns the downcasted uint160 from uint256, reverting on
     * overflow (when the input is greater than largest uint160).
     *
     * Counterpart to Solidity's `uint160` operator.
     *
     * Requirements:
     *
     * - input must fit into 160 bits
     */
    function toUint160(uint256 value) internal pure returns (uint160) {
        if (value > type(uint160).max) {
            revert SafeCastOverflowedUintDowncast(160, value);
        }
        return uint160(value);
    }

    /**
     * @dev Returns the downcasted uint152 from uint256, reverting on
     * overflow (when the input is greater than largest uint152).
     *
     * Counterpart to Solidity's `uint152` operator.
     *
     * Requirements:
     *
     * - input must fit into 152 bits
     */
    function toUint152(uint256 value) internal pure returns (uint152) {
        if (value > type(uint152).max) {
            revert SafeCastOverflowedUintDowncast(152, value);
        }
        return uint152(value);
    }

    /**
     * @dev Returns the downcasted uint144 from uint256, reverting on
     * overflow (when the input is greater than largest uint144).
     *
     * Counterpart to Solidity's `uint144` operator.
     *
     * Requirements:
     *
     * - input must fit into 144 bits
     */
    function toUint144(uint256 value) internal pure returns (uint144) {
        if (value > type(uint144).max) {
            revert SafeCastOverflowedUintDowncast(144, value);
        }
        return uint144(value);
    }

    /**
     * @dev Returns the downcasted uint136 from uint256, reverting on
     * overflow (when the input is greater than largest uint136).
     *
     * Counterpart to Solidity's `uint136` operator.
     *
     * Requirements:
     *
     * - input must fit into 136 bits
     */
    function toUint136(uint256 value) internal pure returns (uint136) {
        if (value > type(uint136).max) {
            revert SafeCastOverflowedUintDowncast(136, value);
        }
        return uint136(value);
    }

    /**
     * @dev Returns the downcasted uint128 from uint256, reverting on
     * overflow (when the input is greater than largest uint128).
     *
     * Counterpart to Solidity's `uint128` operator.
     *
     * Requirements:
     *
     * - input must fit into 128 bits
     */
    function toUint128(uint256 value) internal pure returns (uint128) {
        if (value > type(uint128).max) {
            revert SafeCastOverflowedUintDowncast(128, value);
        }
        return uint128(value);
    }

    /**
     * @dev Returns the downcasted uint120 from uint256, reverting on
     * overflow (when the input is greater than largest uint120).
     *
     * Counterpart to Solidity's `uint120` operator.
     *
     * Requirements:
     *
     * - input must fit into 120 bits
     */
    function toUint120(uint256 value) internal pure returns (uint120) {
        if (value > type(uint120).max) {
            revert SafeCastOverflowedUintDowncast(120, value);
        }
        return uint120(value);
    }

    /**
     * @dev Returns the downcasted uint112 from uint256, reverting on
     * overflow (when the input is greater than largest uint112).
     *
     * Counterpart to Solidity's `uint112` operator.
     *
     * Requirements:
     *
     * - input must fit into 112 bits
     */
    function toUint112(uint256 value) internal pure returns (uint112) {
        if (value > type(uint112).max) {
            revert SafeCastOverflowedUintDowncast(112, value);
        }
        return uint112(value);
    }

    /**
     * @dev Returns the downcasted uint104 from uint256, reverting on
     * overflow (when the input is greater than largest uint104).
     *
     * Counterpart to Solidity's `uint104` operator.
     *
     * Requirements:
     *
     * - input must fit into 104 bits
     */
    function toUint104(uint256 value) internal pure returns (uint104) {
        if (value > type(uint104).max) {
            revert SafeCastOverflowedUintDowncast(104, value);
        }
        return uint104(value);
    }

    /**
     * @dev Returns the downcasted uint96 from uint256, reverting on
     * overflow (when the input is greater than largest uint96).
     *
     * Counterpart to Solidity's `uint96` operator.
     *
     * Requirements:
     *
     * - input must fit into 96 bits
     */
    function toUint96(uint256 value) internal pure returns (uint96) {
        if (value > type(uint96).max) {
            revert SafeCastOverflowedUintDowncast(96, value);
        }
        return uint96(value);
    }

    /**
     * @dev Returns the downcasted uint88 from uint256, reverting on
     * overflow (when the input is greater than largest uint88).
     *
     * Counterpart to Solidity's `uint88` operator.
     *
     * Requirements:
     *
     * - input must fit into 88 bits
     */
    function toUint88(uint256 value) internal pure returns (uint88) {
        if (value > type(uint88).max) {
            revert SafeCastOverflowedUintDowncast(88, value);
        }
        return uint88(value);
    }

    /**
     * @dev Returns the downcasted uint80 from uint256, reverting on
     * overflow (when the input is greater than largest uint80).
     *
     * Counterpart to Solidity's `uint80` operator.
     *
     * Requirements:
     *
     * - input must fit into 80 bits
     */
    function toUint80(uint256 value) internal pure returns (uint80) {
        if (value > type(uint80).max) {
            revert SafeCastOverflowedUintDowncast(80, value);
        }
        return uint80(value);
    }

    /**
     * @dev Returns the downcasted uint72 from uint256, reverting on
     * overflow (when the input is greater than largest uint72).
     *
     * Counterpart to Solidity's `uint72` operator.
     *
     * Requirements:
     *
     * - input must fit into 72 bits
     */
    function toUint72(uint256 value) internal pure returns (uint72) {
        if (value > type(uint72).max) {
            revert SafeCastOverflowedUintDowncast(72, value);
        }
        return uint72(value);
    }

    /**
     * @dev Returns the downcasted uint64 from uint256, reverting on
     * overflow (when the input is greater than largest uint64).
     *
     * Counterpart to Solidity's `uint64` operator.
     *
     * Requirements:
     *
     * - input must fit into 64 bits
     */
    function toUint64(uint256 value) internal pure returns (uint64) {
        if (value > type(uint64).max) {
            revert SafeCastOverflowedUintDowncast(64, value);
        }
        return uint64(value);
    }

    /**
     * @dev Returns the downcasted uint56 from uint256, reverting on
     * overflow (when the input is greater than largest uint56).
     *
     * Counterpart to Solidity's `uint56` operator.
     *
     * Requirements:
     *
     * - input must fit into 56 bits
     */
    function toUint56(uint256 value) internal pure returns (uint56) {
        if (value > type(uint56).max) {
            revert SafeCastOverflowedUintDowncast(56, value);
        }
        return uint56(value);
    }

    /**
     * @dev Returns the downcasted uint48 from uint256, reverting on
     * overflow (when the input is greater than largest uint48).
     *
     * Counterpart to Solidity's `uint48` operator.
     *
     * Requirements:
     *
     * - input must fit into 48 bits
     */
    function toUint48(uint256 value) internal pure returns (uint48) {
        if (value > type(uint48).max) {
            revert SafeCastOverflowedUintDowncast(48, value);
        }
        return uint48(value);
    }

    /**
     * @dev Returns the downcasted uint40 from uint256, reverting on
     * overflow (when the input is greater than largest uint40).
     *
     * Counterpart to Solidity's `uint40` operator.
     *
     * Requirements:
     *
     * - input must fit into 40 bits
     */
    function toUint40(uint256 value) internal pure returns (uint40) {
        if (value > type(uint40).max) {
            revert SafeCastOverflowedUintDowncast(40, value);
        }
        return uint40(value);
    }

    /**
     * @dev Returns the downcasted uint32 from uint256, reverting on
     * overflow (when the input is greater than largest uint32).
     *
     * Counterpart to Solidity's `uint32` operator.
     *
     * Requirements:
     *
     * - input must fit into 32 bits
     */
    function toUint32(uint256 value) internal pure returns (uint32) {
        if (value > type(uint32).max) {
            revert SafeCastOverflowedUintDowncast(32, value);
        }
        return uint32(value);
    }

    /**
     * @dev Returns the downcasted uint24 from uint256, reverting on
     * overflow (when the input is greater than largest uint24).
     *
     * Counterpart to Solidity's `uint24` operator.
     *
     * Requirements:
     *
     * - input must fit into 24 bits
     */
    function toUint24(uint256 value) internal pure returns (uint24) {
        if (value > type(uint24).max) {
            revert SafeCastOverflowedUintDowncast(24, value);
        }
        return uint24(value);
    }

    /**
     * @dev Returns the downcasted uint16 from uint256, reverting on
     * overflow (when the input is greater than largest uint16).
     *
     * Counterpart to Solidity's `uint16` operator.
     *
     * Requirements:
     *
     * - input must fit into 16 bits
     */
    function toUint16(uint256 value) internal pure returns (uint16) {
        if (value > type(uint16).max) {
            revert SafeCastOverflowedUintDowncast(16, value);
        }
        return uint16(value);
    }

    /**
     * @dev Returns the downcasted uint8 from uint256, reverting on
     * overflow (when the input is greater than largest uint8).
     *
     * Counterpart to Solidity's `uint8` operator.
     *
     * Requirements:
     *
     * - input must fit into 8 bits
     */
    function toUint8(uint256 value) internal pure returns (uint8) {
        if (value > type(uint8).max) {
            revert SafeCastOverflowedUintDowncast(8, value);
        }
        return uint8(value);
    }

    /**
     * @dev Converts a signed int256 into an unsigned uint256.
     *
     * Requirements:
     *
     * - input must be greater than or equal to 0.
     */
    function toUint256(int256 value) internal pure returns (uint256) {
        if (value < 0) {
            revert SafeCastOverflowedIntToUint(value);
        }
        return uint256(value);
    }

    /**
     * @dev Returns the downcasted int248 from int256, reverting on
     * overflow (when the input is less than smallest int248 or
     * greater than largest int248).
     *
     * Counterpart to Solidity's `int248` operator.
     *
     * Requirements:
     *
     * - input must fit into 248 bits
     */
    function toInt248(int256 value) internal pure returns (int248 downcasted) {
        downcasted = int248(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(248, value);
        }
    }

    /**
     * @dev Returns the downcasted int240 from int256, reverting on
     * overflow (when the input is less than smallest int240 or
     * greater than largest int240).
     *
     * Counterpart to Solidity's `int240` operator.
     *
     * Requirements:
     *
     * - input must fit into 240 bits
     */
    function toInt240(int256 value) internal pure returns (int240 downcasted) {
        downcasted = int240(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(240, value);
        }
    }

    /**
     * @dev Returns the downcasted int232 from int256, reverting on
     * overflow (when the input is less than smallest int232 or
     * greater than largest int232).
     *
     * Counterpart to Solidity's `int232` operator.
     *
     * Requirements:
     *
     * - input must fit into 232 bits
     */
    function toInt232(int256 value) internal pure returns (int232 downcasted) {
        downcasted = int232(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(232, value);
        }
    }

    /**
     * @dev Returns the downcasted int224 from int256, reverting on
     * overflow (when the input is less than smallest int224 or
     * greater than largest int224).
     *
     * Counterpart to Solidity's `int224` operator.
     *
     * Requirements:
     *
     * - input must fit into 224 bits
     */
    function toInt224(int256 value) internal pure returns (int224 downcasted) {
        downcasted = int224(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(224, value);
        }
    }

    /**
     * @dev Returns the downcasted int216 from int256, reverting on
     * overflow (when the input is less than smallest int216 or
     * greater than largest int216).
     *
     * Counterpart to Solidity's `int216` operator.
     *
     * Requirements:
     *
     * - input must fit into 216 bits
     */
    function toInt216(int256 value) internal pure returns (int216 downcasted) {
        downcasted = int216(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(216, value);
        }
    }

    /**
     * @dev Returns the downcasted int208 from int256, reverting on
     * overflow (when the input is less than smallest int208 or
     * greater than largest int208).
     *
     * Counterpart to Solidity's `int208` operator.
     *
     * Requirements:
     *
     * - input must fit into 208 bits
     */
    function toInt208(int256 value) internal pure returns (int208 downcasted) {
        downcasted = int208(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(208, value);
        }
    }

    /**
     * @dev Returns the downcasted int200 from int256, reverting on
     * overflow (when the input is less than smallest int200 or
     * greater than largest int200).
     *
     * Counterpart to Solidity's `int200` operator.
     *
     * Requirements:
     *
     * - input must fit into 200 bits
     */
    function toInt200(int256 value) internal pure returns (int200 downcasted) {
        downcasted = int200(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(200, value);
        }
    }

    /**
     * @dev Returns the downcasted int192 from int256, reverting on
     * overflow (when the input is less than smallest int192 or
     * greater than largest int192).
     *
     * Counterpart to Solidity's `int192` operator.
     *
     * Requirements:
     *
     * - input must fit into 192 bits
     */
    function toInt192(int256 value) internal pure returns (int192 downcasted) {
        downcasted = int192(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(192, value);
        }
    }

    /**
     * @dev Returns the downcasted int184 from int256, reverting on
     * overflow (when the input is less than smallest int184 or
     * greater than largest int184).
     *
     * Counterpart to Solidity's `int184` operator.
     *
     * Requirements:
     *
     * - input must fit into 184 bits
     */
    function toInt184(int256 value) internal pure returns (int184 downcasted) {
        downcasted = int184(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(184, value);
        }
    }

    /**
     * @dev Returns the downcasted int176 from int256, reverting on
     * overflow (when the input is less than smallest int176 or
     * greater than largest int176).
     *
     * Counterpart to Solidity's `int176` operator.
     *
     * Requirements:
     *
     * - input must fit into 176 bits
     */
    function toInt176(int256 value) internal pure returns (int176 downcasted) {
        downcasted = int176(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(176, value);
        }
    }

    /**
     * @dev Returns the downcasted int168 from int256, reverting on
     * overflow (when the input is less than smallest int168 or
     * greater than largest int168).
     *
     * Counterpart to Solidity's `int168` operator.
     *
     * Requirements:
     *
     * - input must fit into 168 bits
     */
    function toInt168(int256 value) internal pure returns (int168 downcasted) {
        downcasted = int168(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(168, value);
        }
    }

    /**
     * @dev Returns the downcasted int160 from int256, reverting on
     * overflow (when the input is less than smallest int160 or
     * greater than largest int160).
     *
     * Counterpart to Solidity's `int160` operator.
     *
     * Requirements:
     *
     * - input must fit into 160 bits
     */
    function toInt160(int256 value) internal pure returns (int160 downcasted) {
        downcasted = int160(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(160, value);
        }
    }

    /**
     * @dev Returns the downcasted int152 from int256, reverting on
     * overflow (when the input is less than smallest int152 or
     * greater than largest int152).
     *
     * Counterpart to Solidity's `int152` operator.
     *
     * Requirements:
     *
     * - input must fit into 152 bits
     */
    function toInt152(int256 value) internal pure returns (int152 downcasted) {
        downcasted = int152(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(152, value);
        }
    }

    /**
     * @dev Returns the downcasted int144 from int256, reverting on
     * overflow (when the input is less than smallest int144 or
     * greater than largest int144).
     *
     * Counterpart to Solidity's `int144` operator.
     *
     * Requirements:
     *
     * - input must fit into 144 bits
     */
    function toInt144(int256 value) internal pure returns (int144 downcasted) {
        downcasted = int144(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(144, value);
        }
    }

    /**
     * @dev Returns the downcasted int136 from int256, reverting on
     * overflow (when the input is less than smallest int136 or
     * greater than largest int136).
     *
     * Counterpart to Solidity's `int136` operator.
     *
     * Requirements:
     *
     * - input must fit into 136 bits
     */
    function toInt136(int256 value) internal pure returns (int136 downcasted) {
        downcasted = int136(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(136, value);
        }
    }

    /**
     * @dev Returns the downcasted int128 from int256, reverting on
     * overflow (when the input is less than smallest int128 or
     * greater than largest int128).
     *
     * Counterpart to Solidity's `int128` operator.
     *
     * Requirements:
     *
     * - input must fit into 128 bits
     */
    function toInt128(int256 value) internal pure returns (int128 downcasted) {
        downcasted = int128(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(128, value);
        }
    }

    /**
     * @dev Returns the downcasted int120 from int256, reverting on
     * overflow (when the input is less than smallest int120 or
     * greater than largest int120).
     *
     * Counterpart to Solidity's `int120` operator.
     *
     * Requirements:
     *
     * - input must fit into 120 bits
     */
    function toInt120(int256 value) internal pure returns (int120 downcasted) {
        downcasted = int120(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(120, value);
        }
    }

    /**
     * @dev Returns the downcasted int112 from int256, reverting on
     * overflow (when the input is less than smallest int112 or
     * greater than largest int112).
     *
     * Counterpart to Solidity's `int112` operator.
     *
     * Requirements:
     *
     * - input must fit into 112 bits
     */
    function toInt112(int256 value) internal pure returns (int112 downcasted) {
        downcasted = int112(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(112, value);
        }
    }

    /**
     * @dev Returns the downcasted int104 from int256, reverting on
     * overflow (when the input is less than smallest int104 or
     * greater than largest int104).
     *
     * Counterpart to Solidity's `int104` operator.
     *
     * Requirements:
     *
     * - input must fit into 104 bits
     */
    function toInt104(int256 value) internal pure returns (int104 downcasted) {
        downcasted = int104(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(104, value);
        }
    }

    /**
     * @dev Returns the downcasted int96 from int256, reverting on
     * overflow (when the input is less than smallest int96 or
     * greater than largest int96).
     *
     * Counterpart to Solidity's `int96` operator.
     *
     * Requirements:
     *
     * - input must fit into 96 bits
     */
    function toInt96(int256 value) internal pure returns (int96 downcasted) {
        downcasted = int96(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(96, value);
        }
    }

    /**
     * @dev Returns the downcasted int88 from int256, reverting on
     * overflow (when the input is less than smallest int88 or
     * greater than largest int88).
     *
     * Counterpart to Solidity's `int88` operator.
     *
     * Requirements:
     *
     * - input must fit into 88 bits
     */
    function toInt88(int256 value) internal pure returns (int88 downcasted) {
        downcasted = int88(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(88, value);
        }
    }

    /**
     * @dev Returns the downcasted int80 from int256, reverting on
     * overflow (when the input is less than smallest int80 or
     * greater than largest int80).
     *
     * Counterpart to Solidity's `int80` operator.
     *
     * Requirements:
     *
     * - input must fit into 80 bits
     */
    function toInt80(int256 value) internal pure returns (int80 downcasted) {
        downcasted = int80(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(80, value);
        }
    }

    /**
     * @dev Returns the downcasted int72 from int256, reverting on
     * overflow (when the input is less than smallest int72 or
     * greater than largest int72).
     *
     * Counterpart to Solidity's `int72` operator.
     *
     * Requirements:
     *
     * - input must fit into 72 bits
     */
    function toInt72(int256 value) internal pure returns (int72 downcasted) {
        downcasted = int72(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(72, value);
        }
    }

    /**
     * @dev Returns the downcasted int64 from int256, reverting on
     * overflow (when the input is less than smallest int64 or
     * greater than largest int64).
     *
     * Counterpart to Solidity's `int64` operator.
     *
     * Requirements:
     *
     * - input must fit into 64 bits
     */
    function toInt64(int256 value) internal pure returns (int64 downcasted) {
        downcasted = int64(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(64, value);
        }
    }

    /**
     * @dev Returns the downcasted int56 from int256, reverting on
     * overflow (when the input is less than smallest int56 or
     * greater than largest int56).
     *
     * Counterpart to Solidity's `int56` operator.
     *
     * Requirements:
     *
     * - input must fit into 56 bits
     */
    function toInt56(int256 value) internal pure returns (int56 downcasted) {
        downcasted = int56(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(56, value);
        }
    }

    /**
     * @dev Returns the downcasted int48 from int256, reverting on
     * overflow (when the input is less than smallest int48 or
     * greater than largest int48).
     *
     * Counterpart to Solidity's `int48` operator.
     *
     * Requirements:
     *
     * - input must fit into 48 bits
     */
    function toInt48(int256 value) internal pure returns (int48 downcasted) {
        downcasted = int48(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(48, value);
        }
    }

    /**
     * @dev Returns the downcasted int40 from int256, reverting on
     * overflow (when the input is less than smallest int40 or
     * greater than largest int40).
     *
     * Counterpart to Solidity's `int40` operator.
     *
     * Requirements:
     *
     * - input must fit into 40 bits
     */
    function toInt40(int256 value) internal pure returns (int40 downcasted) {
        downcasted = int40(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(40, value);
        }
    }

    /**
     * @dev Returns the downcasted int32 from int256, reverting on
     * overflow (when the input is less than smallest int32 or
     * greater than largest int32).
     *
     * Counterpart to Solidity's `int32` operator.
     *
     * Requirements:
     *
     * - input must fit into 32 bits
     */
    function toInt32(int256 value) internal pure returns (int32 downcasted) {
        downcasted = int32(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(32, value);
        }
    }

    /**
     * @dev Returns the downcasted int24 from int256, reverting on
     * overflow (when the input is less than smallest int24 or
     * greater than largest int24).
     *
     * Counterpart to Solidity's `int24` operator.
     *
     * Requirements:
     *
     * - input must fit into 24 bits
     */
    function toInt24(int256 value) internal pure returns (int24 downcasted) {
        downcasted = int24(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(24, value);
        }
    }

    /**
     * @dev Returns the downcasted int16 from int256, reverting on
     * overflow (when the input is less than smallest int16 or
     * greater than largest int16).
     *
     * Counterpart to Solidity's `int16` operator.
     *
     * Requirements:
     *
     * - input must fit into 16 bits
     */
    function toInt16(int256 value) internal pure returns (int16 downcasted) {
        downcasted = int16(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(16, value);
        }
    }

    /**
     * @dev Returns the downcasted int8 from int256, reverting on
     * overflow (when the input is less than smallest int8 or
     * greater than largest int8).
     *
     * Counterpart to Solidity's `int8` operator.
     *
     * Requirements:
     *
     * - input must fit into 8 bits
     */
    function toInt8(int256 value) internal pure returns (int8 downcasted) {
        downcasted = int8(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(8, value);
        }
    }

    /**
     * @dev Converts an unsigned uint256 into a signed int256.
     *
     * Requirements:
     *
     * - input must be less than or equal to maxInt256.
     */
    function toInt256(uint256 value) internal pure returns (int256) {
        // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive
        if (value > uint256(type(int256).max)) {
            revert SafeCastOverflowedUintToInt(value);
        }
        return int256(value);
    }

    /**
     * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.
     */
    function toUint(bool b) internal pure returns (uint256 u) {
        assembly ("memory-safe") {
            u := iszero(iszero(b))
        }
    }
}

// File: @openzeppelin/contracts/utils/math/Math.sol


// OpenZeppelin Contracts (last updated v5.3.0) (utils/math/Math.sol)

pragma solidity ^0.8.20;



/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    enum Rounding {
        Floor, // Toward negative infinity
        Ceil, // Toward positive infinity
        Trunc, // Toward zero
        Expand // Away from zero
    }

    /**
     * @dev Return the 512-bit addition of two uint256.
     *
     * The result is stored in two 256 variables such that sum = high * 2²⁵⁶ + low.
     */
    function add512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {
        assembly ("memory-safe") {
            low := add(a, b)
            high := lt(low, a)
        }
    }

    /**
     * @dev Return the 512-bit multiplication of two uint256.
     *
     * The result is stored in two 256 variables such that product = high * 2²⁵⁶ + low.
     */
    function mul512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {
        // 512-bit multiply [high low] = x * y. Compute the product mod 2²⁵⁶ and mod 2²⁵⁶ - 1, then use
        // the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
        // variables such that product = high * 2²⁵⁶ + low.
        assembly ("memory-safe") {
            let mm := mulmod(a, b, not(0))
            low := mul(a, b)
            high := sub(sub(mm, low), lt(mm, low))
        }
    }

    /**
     * @dev Returns the addition of two unsigned integers, with a success flag (no overflow).
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {
        unchecked {
            uint256 c = a + b;
            success = c >= a;
            result = c * SafeCast.toUint(success);
        }
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, with a success flag (no overflow).
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {
        unchecked {
            uint256 c = a - b;
            success = c <= a;
            result = c * SafeCast.toUint(success);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with a success flag (no overflow).
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {
        unchecked {
            uint256 c = a * b;
            assembly ("memory-safe") {
                // Only true when the multiplication doesn't overflow
                // (c / a == b) || (a == 0)
                success := or(eq(div(c, a), b), iszero(a))
            }
            // equivalent to: success ? c : 0
            result = c * SafeCast.toUint(success);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a success flag (no division by zero).
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {
        unchecked {
            success = b > 0;
            assembly ("memory-safe") {
                // The `DIV` opcode returns zero when the denominator is 0.
                result := div(a, b)
            }
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero).
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {
        unchecked {
            success = b > 0;
            assembly ("memory-safe") {
                // The `MOD` opcode returns zero when the denominator is 0.
                result := mod(a, b)
            }
        }
    }

    /**
     * @dev Unsigned saturating addition, bounds to `2²⁵⁶ - 1` instead of overflowing.
     */
    function saturatingAdd(uint256 a, uint256 b) internal pure returns (uint256) {
        (bool success, uint256 result) = tryAdd(a, b);
        return ternary(success, result, type(uint256).max);
    }

    /**
     * @dev Unsigned saturating subtraction, bounds to zero instead of overflowing.
     */
    function saturatingSub(uint256 a, uint256 b) internal pure returns (uint256) {
        (, uint256 result) = trySub(a, b);
        return result;
    }

    /**
     * @dev Unsigned saturating multiplication, bounds to `2²⁵⁶ - 1` instead of overflowing.
     */
    function saturatingMul(uint256 a, uint256 b) internal pure returns (uint256) {
        (bool success, uint256 result) = tryMul(a, b);
        return ternary(success, result, type(uint256).max);
    }

    /**
     * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.
     *
     * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.
     * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute
     * one branch when needed, making this function more expensive.
     */
    function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) {
        unchecked {
            // branchless ternary works because:
            // b ^ (a ^ b) == a
            // b ^ 0 == b
            return b ^ ((a ^ b) * SafeCast.toUint(condition));
        }
    }

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

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return ternary(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 towards infinity instead
     * of rounding towards zero.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        if (b == 0) {
            // Guarantee the same behavior as in a regular Solidity division.
            Panic.panic(Panic.DIVISION_BY_ZERO);
        }

        // The following calculation ensures accurate ceiling division without overflow.
        // Since a is non-zero, (a - 1) / b will not overflow.
        // The largest possible result occurs when (a - 1) / b is type(uint256).max,
        // but the largest value we can obtain is type(uint256).max - 1, which happens
        // when a = type(uint256).max and b = 1.
        unchecked {
            return SafeCast.toUint(a > 0) * ((a - 1) / b + 1);
        }
    }

    /**
     * @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or
     * denominator == 0.
     *
     * 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 {
            (uint256 high, uint256 low) = mul512(x, y);

            // Handle non-overflow cases, 256 by 256 division.
            if (high == 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 low / denominator;
            }

            // Make sure the result is less than 2²⁵⁶. Also prevents denominator == 0.
            if (denominator <= high) {
                Panic.panic(ternary(denominator == 0, Panic.DIVISION_BY_ZERO, Panic.UNDER_OVERFLOW));
            }

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

            // Make division exact by subtracting the remainder from [high low].
            uint256 remainder;
            assembly ("memory-safe") {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                high := sub(high, gt(remainder, low))
                low := sub(low, 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.

            uint256 twos = denominator & (0 - denominator);
            assembly ("memory-safe") {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [high low] by twos.
                low := div(low, twos)

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

            // Shift in bits from high into low.
            low |= high * twos;

            // Invert denominator mod 2²⁵⁶. Now that denominator is an odd number, it has an inverse modulo 2²⁵⁶ such
            // that denominator * inv ≡ 1 mod 2²⁵⁶. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv ≡ 1 mod 2⁴.
            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⁸
            inverse *= 2 - denominator * inverse; // inverse mod 2¹⁶
            inverse *= 2 - denominator * inverse; // inverse mod 2³²
            inverse *= 2 - denominator * inverse; // inverse mod 2⁶⁴
            inverse *= 2 - denominator * inverse; // inverse mod 2¹²⁸
            inverse *= 2 - denominator * inverse; // inverse mod 2²⁵⁶

            // 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²⁵⁶. Since the preconditions guarantee that the outcome is
            // less than 2²⁵⁶, this is the final result. We don't need to compute the high bits of the result and high
            // is no longer required.
            result = low * inverse;
            return result;
        }
    }

    /**
     * @dev 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) {
        return mulDiv(x, y, denominator) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0);
    }

    /**
     * @dev Calculates floor(x * y >> n) with full precision. Throws if result overflows a uint256.
     */
    function mulShr(uint256 x, uint256 y, uint8 n) internal pure returns (uint256 result) {
        unchecked {
            (uint256 high, uint256 low) = mul512(x, y);
            if (high >= 1 << n) {
                Panic.panic(Panic.UNDER_OVERFLOW);
            }
            return (high << (256 - n)) | (low >> n);
        }
    }

    /**
     * @dev Calculates x * y >> n with full precision, following the selected rounding direction.
     */
    function mulShr(uint256 x, uint256 y, uint8 n, Rounding rounding) internal pure returns (uint256) {
        return mulShr(x, y, n) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, 1 << n) > 0);
    }

    /**
     * @dev Calculate the modular multiplicative inverse of a number in Z/nZ.
     *
     * If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0.
     * If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible.
     *
     * If the input value is not inversible, 0 is returned.
     *
     * NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the
     * inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}.
     */
    function invMod(uint256 a, uint256 n) internal pure returns (uint256) {
        unchecked {
            if (n == 0) return 0;

            // The inverse modulo is calculated using the Extended Euclidean Algorithm (iterative version)
            // Used to compute integers x and y such that: ax + ny = gcd(a, n).
            // When the gcd is 1, then the inverse of a modulo n exists and it's x.
            // ax + ny = 1
            // ax = 1 + (-y)n
            // ax ≡ 1 (mod n) # x is the inverse of a modulo n

            // If the remainder is 0 the gcd is n right away.
            uint256 remainder = a % n;
            uint256 gcd = n;

            // Therefore the initial coefficients are:
            // ax + ny = gcd(a, n) = n
            // 0a + 1n = n
            int256 x = 0;
            int256 y = 1;

            while (remainder != 0) {
                uint256 quotient = gcd / remainder;

                (gcd, remainder) = (
                    // The old remainder is the next gcd to try.
                    remainder,
                    // Compute the next remainder.
                    // Can't overflow given that (a % gcd) * (gcd // (a % gcd)) <= gcd
                    // where gcd is at most n (capped to type(uint256).max)
                    gcd - remainder * quotient
                );

                (x, y) = (
                    // Increment the coefficient of a.
                    y,
                    // Decrement the coefficient of n.
                    // Can overflow, but the result is casted to uint256 so that the
                    // next value of y is "wrapped around" to a value between 0 and n - 1.
                    x - y * int256(quotient)
                );
            }

            if (gcd != 1) return 0; // No inverse exists.
            return ternary(x < 0, n - uint256(-x), uint256(x)); // Wrap the result if it's negative.
        }
    }

    /**
     * @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`.
     *
     * From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is
     * prime, then `a**(p-1) ≡ 1 mod p`. As a consequence, we have `a * a**(p-2) ≡ 1 mod p`, which means that
     * `a**(p-2)` is the modular multiplicative inverse of a in Fp.
     *
     * NOTE: this function does NOT check that `p` is a prime greater than `2`.
     */
    function invModPrime(uint256 a, uint256 p) internal view returns (uint256) {
        unchecked {
            return Math.modExp(a, p - 2, p);
        }
    }

    /**
     * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m)
     *
     * Requirements:
     * - modulus can't be zero
     * - underlying staticcall to precompile must succeed
     *
     * IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make
     * sure the chain you're using it on supports the precompiled contract for modular exponentiation
     * at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise,
     * the underlying function will succeed given the lack of a revert, but the result may be incorrectly
     * interpreted as 0.
     */
    function modExp(uint256 b, uint256 e, uint256 m) internal view returns (uint256) {
        (bool success, uint256 result) = tryModExp(b, e, m);
        if (!success) {
            Panic.panic(Panic.DIVISION_BY_ZERO);
        }
        return result;
    }

    /**
     * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m).
     * It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying
     * to operate modulo 0 or if the underlying precompile reverted.
     *
     * IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain
     * you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in
     * https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack
     * of a revert, but the result may be incorrectly interpreted as 0.
     */
    function tryModExp(uint256 b, uint256 e, uint256 m) internal view returns (bool success, uint256 result) {
        if (m == 0) return (false, 0);
        assembly ("memory-safe") {
            let ptr := mload(0x40)
            // | Offset    | Content    | Content (Hex)                                                      |
            // |-----------|------------|--------------------------------------------------------------------|
            // | 0x00:0x1f | size of b  | 0x0000000000000000000000000000000000000000000000000000000000000020 |
            // | 0x20:0x3f | size of e  | 0x0000000000000000000000000000000000000000000000000000000000000020 |
            // | 0x40:0x5f | size of m  | 0x0000000000000000000000000000000000000000000000000000000000000020 |
            // | 0x60:0x7f | value of b | 0x<.............................................................b> |
            // | 0x80:0x9f | value of e | 0x<.............................................................e> |
            // | 0xa0:0xbf | value of m | 0x<.............................................................m> |
            mstore(ptr, 0x20)
            mstore(add(ptr, 0x20), 0x20)
            mstore(add(ptr, 0x40), 0x20)
            mstore(add(ptr, 0x60), b)
            mstore(add(ptr, 0x80), e)
            mstore(add(ptr, 0xa0), m)

            // Given the result < m, it's guaranteed to fit in 32 bytes,
            // so we can use the memory scratch space located at offset 0.
            success := staticcall(gas(), 0x05, ptr, 0xc0, 0x00, 0x20)
            result := mload(0x00)
        }
    }

    /**
     * @dev Variant of {modExp} that supports inputs of arbitrary length.
     */
    function modExp(bytes memory b, bytes memory e, bytes memory m) internal view returns (bytes memory) {
        (bool success, bytes memory result) = tryModExp(b, e, m);
        if (!success) {
            Panic.panic(Panic.DIVISION_BY_ZERO);
        }
        return result;
    }

    /**
     * @dev Variant of {tryModExp} that supports inputs of arbitrary length.
     */
    function tryModExp(
        bytes memory b,
        bytes memory e,
        bytes memory m
    ) internal view returns (bool success, bytes memory result) {
        if (_zeroBytes(m)) return (false, new bytes(0));

        uint256 mLen = m.length;

        // Encode call args in result and move the free memory pointer
        result = abi.encodePacked(b.length, e.length, mLen, b, e, m);

        assembly ("memory-safe") {
            let dataPtr := add(result, 0x20)
            // Write result on top of args to avoid allocating extra memory.
            success := staticcall(gas(), 0x05, dataPtr, mload(result), dataPtr, mLen)
            // Overwrite the length.
            // result.length > returndatasize() is guaranteed because returndatasize() == m.length
            mstore(result, mLen)
            // Set the memory pointer after the returned data.
            mstore(0x40, add(dataPtr, mLen))
        }
    }

    /**
     * @dev Returns whether the provided byte array is zero.
     */
    function _zeroBytes(bytes memory byteArray) private pure returns (bool) {
        for (uint256 i = 0; i < byteArray.length; ++i) {
            if (byteArray[i] != 0) {
                return false;
            }
        }
        return true;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded
     * towards zero.
     *
     * This method is based on Newton's method for computing square roots; the algorithm is restricted to only
     * using integer operations.
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        unchecked {
            // Take care of easy edge cases when a == 0 or a == 1
            if (a <= 1) {
                return a;
            }

            // In this function, we use Newton's method to get a root of `f(x) := x² - a`. It involves building a
            // sequence x_n that converges toward sqrt(a). For each iteration x_n, we also define the error between
            // the current value as `ε_n = | x_n - sqrt(a) |`.
            //
            // For our first estimation, we consider `e` the smallest power of 2 which is bigger than the square root
            // of the target. (i.e. `2**(e-1) ≤ sqrt(a) < 2**e`). We know that `e ≤ 128` because `(2¹²⁸)² = 2²⁵⁶` is
            // bigger than any uint256.
            //
            // By noticing that
            // `2**(e-1) ≤ sqrt(a) < 2**e → (2**(e-1))² ≤ a < (2**e)² → 2**(2*e-2) ≤ a < 2**(2*e)`
            // we can deduce that `e - 1` is `log2(a) / 2`. We can thus compute `x_n = 2**(e-1)` using a method similar
            // to the msb function.
            uint256 aa = a;
            uint256 xn = 1;

            if (aa >= (1 << 128)) {
                aa >>= 128;
                xn <<= 64;
            }
            if (aa >= (1 << 64)) {
                aa >>= 64;
                xn <<= 32;
            }
            if (aa >= (1 << 32)) {
                aa >>= 32;
                xn <<= 16;
            }
            if (aa >= (1 << 16)) {
                aa >>= 16;
                xn <<= 8;
            }
            if (aa >= (1 << 8)) {
                aa >>= 8;
                xn <<= 4;
            }
            if (aa >= (1 << 4)) {
                aa >>= 4;
                xn <<= 2;
            }
            if (aa >= (1 << 2)) {
                xn <<= 1;
            }

            // We now have x_n such that `x_n = 2**(e-1) ≤ sqrt(a) < 2**e = 2 * x_n`. This implies ε_n ≤ 2**(e-1).
            //
            // We can refine our estimation by noticing that the middle of that interval minimizes the error.
            // If we move x_n to equal 2**(e-1) + 2**(e-2), then we reduce the error to ε_n ≤ 2**(e-2).
            // This is going to be our x_0 (and ε_0)
            xn = (3 * xn) >> 1; // ε_0 := | x_0 - sqrt(a) | ≤ 2**(e-2)

            // From here, Newton's method give us:
            // x_{n+1} = (x_n + a / x_n) / 2
            //
            // One should note that:
            // x_{n+1}² - a = ((x_n + a / x_n) / 2)² - a
            //              = ((x_n² + a) / (2 * x_n))² - a
            //              = (x_n⁴ + 2 * a * x_n² + a²) / (4 * x_n²) - a
            //              = (x_n⁴ + 2 * a * x_n² + a² - 4 * a * x_n²) / (4 * x_n²)
            //              = (x_n⁴ - 2 * a * x_n² + a²) / (4 * x_n²)
            //              = (x_n² - a)² / (2 * x_n)²
            //              = ((x_n² - a) / (2 * x_n))²
            //              ≥ 0
            // Which proves that for all n ≥ 1, sqrt(a) ≤ x_n
            //
            // This gives us the proof of quadratic convergence of the sequence:
            // ε_{n+1} = | x_{n+1} - sqrt(a) |
            //         = | (x_n + a / x_n) / 2 - sqrt(a) |
            //         = | (x_n² + a - 2*x_n*sqrt(a)) / (2 * x_n) |
            //         = | (x_n - sqrt(a))² / (2 * x_n) |
            //         = | ε_n² / (2 * x_n) |
            //         = ε_n² / | (2 * x_n) |
            //
            // For the first iteration, we have a special case where x_0 is known:
            // ε_1 = ε_0² / | (2 * x_0) |
            //     ≤ (2**(e-2))² / (2 * (2**(e-1) + 2**(e-2)))
            //     ≤ 2**(2*e-4) / (3 * 2**(e-1))
            //     ≤ 2**(e-3) / 3
            //     ≤ 2**(e-3-log2(3))
            //     ≤ 2**(e-4.5)
            //
            // For the following iterations, we use the fact that, 2**(e-1) ≤ sqrt(a) ≤ x_n:
            // ε_{n+1} = ε_n² / | (2 * x_n) |
            //         ≤ (2**(e-k))² / (2 * 2**(e-1))
            //         ≤ 2**(2*e-2*k) / 2**e
            //         ≤ 2**(e-2*k)
            xn = (xn + a / xn) >> 1; // ε_1 := | x_1 - sqrt(a) | ≤ 2**(e-4.5)  -- special case, see above
            xn = (xn + a / xn) >> 1; // ε_2 := | x_2 - sqrt(a) | ≤ 2**(e-9)    -- general case with k = 4.5
            xn = (xn + a / xn) >> 1; // ε_3 := | x_3 - sqrt(a) | ≤ 2**(e-18)   -- general case with k = 9
            xn = (xn + a / xn) >> 1; // ε_4 := | x_4 - sqrt(a) | ≤ 2**(e-36)   -- general case with k = 18
            xn = (xn + a / xn) >> 1; // ε_5 := | x_5 - sqrt(a) | ≤ 2**(e-72)   -- general case with k = 36
            xn = (xn + a / xn) >> 1; // ε_6 := | x_6 - sqrt(a) | ≤ 2**(e-144)  -- general case with k = 72

            // Because e ≤ 128 (as discussed during the first estimation phase), we know have reached a precision
            // ε_6 ≤ 2**(e-144) < 1. Given we're operating on integers, then we can ensure that xn is now either
            // sqrt(a) or sqrt(a) + 1.
            return xn - SafeCast.toUint(xn > a / xn);
        }
    }

    /**
     * @dev 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 + SafeCast.toUint(unsignedRoundsUp(rounding) && result * result < a);
        }
    }

    /**
     * @dev Return the log in base 2 of a positive value rounded towards zero.
     * Returns 0 if given 0.
     */
    function log2(uint256 x) internal pure returns (uint256 r) {
        // If value has upper 128 bits set, log2 result is at least 128
        r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;
        // If upper 64 bits of 128-bit half set, add 64 to result
        r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;
        // If upper 32 bits of 64-bit half set, add 32 to result
        r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;
        // If upper 16 bits of 32-bit half set, add 16 to result
        r |= SafeCast.toUint((x >> r) > 0xffff) << 4;
        // If upper 8 bits of 16-bit half set, add 8 to result
        r |= SafeCast.toUint((x >> r) > 0xff) << 3;
        // If upper 4 bits of 8-bit half set, add 4 to result
        r |= SafeCast.toUint((x >> r) > 0xf) << 2;

        // Shifts value right by the current result and use it as an index into this lookup table:
        //
        // | x (4 bits) |  index  | table[index] = MSB position |
        // |------------|---------|-----------------------------|
        // |    0000    |    0    |        table[0] = 0         |
        // |    0001    |    1    |        table[1] = 0         |
        // |    0010    |    2    |        table[2] = 1         |
        // |    0011    |    3    |        table[3] = 1         |
        // |    0100    |    4    |        table[4] = 2         |
        // |    0101    |    5    |        table[5] = 2         |
        // |    0110    |    6    |        table[6] = 2         |
        // |    0111    |    7    |        table[7] = 2         |
        // |    1000    |    8    |        table[8] = 3         |
        // |    1001    |    9    |        table[9] = 3         |
        // |    1010    |   10    |        table[10] = 3        |
        // |    1011    |   11    |        table[11] = 3        |
        // |    1100    |   12    |        table[12] = 3        |
        // |    1101    |   13    |        table[13] = 3        |
        // |    1110    |   14    |        table[14] = 3        |
        // |    1111    |   15    |        table[15] = 3        |
        //
        // The lookup table is represented as a 32-byte value with the MSB positions for 0-15 in the last 16 bytes.
        assembly ("memory-safe") {
            r := or(r, byte(shr(r, x), 0x0000010102020202030303030303030300000000000000000000000000000000))
        }
    }

    /**
     * @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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << result < value);
        }
    }

    /**
     * @dev Return the log in base 10 of a positive value rounded towards zero.
     * 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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 10 ** result < value);
        }
    }

    /**
     * @dev Return the log in base 256 of a positive value rounded towards zero.
     * 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 x) internal pure returns (uint256 r) {
        // If value has upper 128 bits set, log2 result is at least 128
        r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;
        // If upper 64 bits of 128-bit half set, add 64 to result
        r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;
        // If upper 32 bits of 64-bit half set, add 32 to result
        r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;
        // If upper 16 bits of 32-bit half set, add 16 to result
        r |= SafeCast.toUint((x >> r) > 0xffff) << 4;
        // Add 1 if upper 8 bits of 16-bit half set, and divide accumulated result by 8
        return (r >> 3) | SafeCast.toUint((x >> r) > 0xff);
    }

    /**
     * @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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << (result << 3) < value);
        }
    }

    /**
     * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.
     */
    function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {
        return uint8(rounding) % 2 == 1;
    }
}

// File: @uniswap/v3-periphery/contracts/libraries/TransferHelper.sol


pragma solidity >=0.6.0;


library TransferHelper {
    /// @notice Transfers tokens from the targeted address to the given destination
    /// @notice Errors with 'STF' if transfer fails
    /// @param token The contract address of the token to be transferred
    /// @param from The originating address from which the tokens will be transferred
    /// @param to The destination address of the transfer
    /// @param value The amount to be transferred
    function safeTransferFrom(
        address token,
        address from,
        address to,
        uint256 value
    ) internal {
        (bool success, bytes memory data) =
            token.call(abi.encodeWithSelector(IERC20.transferFrom.selector, from, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'STF');
    }

    /// @notice Transfers tokens from msg.sender to a recipient
    /// @dev Errors with ST if transfer fails
    /// @param token The contract address of the token which will be transferred
    /// @param to The recipient of the transfer
    /// @param value The value of the transfer
    function safeTransfer(
        address token,
        address to,
        uint256 value
    ) internal {
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(IERC20.transfer.selector, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'ST');
    }

    /// @notice Approves the stipulated contract to spend the given allowance in the given token
    /// @dev Errors with 'SA' if transfer fails
    /// @param token The contract address of the token to be approved
    /// @param to The target of the approval
    /// @param value The amount of the given token the target will be allowed to spend
    function safeApprove(
        address token,
        address to,
        uint256 value
    ) internal {
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(IERC20.approve.selector, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'SA');
    }

    /// @notice Transfers ETH to the recipient address
    /// @dev Fails with `STE`
    /// @param to The destination of the transfer
    /// @param value The value to be transferred
    function safeTransferETH(address to, uint256 value) internal {
        (bool success, ) = to.call{value: value}(new bytes(0));
        require(success, 'STE');
    }
}

// File: @openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol


// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/ERC20Burnable.sol)

pragma solidity ^0.8.20;



/**
 * @dev Extension of {ERC20} that allows token holders to destroy both their own
 * tokens and those that they have an allowance for, in a way that can be
 * recognized off-chain (via event analysis).
 */
abstract contract ERC20Burnable is Context, ERC20 {
    /**
     * @dev Destroys a `value` amount of tokens from the caller.
     *
     * See {ERC20-_burn}.
     */
    function burn(uint256 value) public virtual {
        _burn(_msgSender(), value);
    }

    /**
     * @dev Destroys a `value` amount of tokens from `account`, deducting from
     * the caller's allowance.
     *
     * See {ERC20-_burn} and {ERC20-allowance}.
     *
     * Requirements:
     *
     * - the caller must have allowance for ``accounts``'s tokens of at least
     * `value`.
     */
    function burnFrom(address account, uint256 value) public virtual {
        _spendAllowance(account, _msgSender(), value);
        _burn(account, value);
    }
}

// File: ICBMToken.sol


pragma solidity ^0.8.7;

// Imports



contract ICBMToken is ERC20Burnable, Ownable {

    // Constructor for the ICBM token
    constructor(string memory name_, string memory symbol_, uint256 totalSupply_, address owner_)
        ERC20(name_, symbol_)
        Ownable(owner_)
    {
        // Mint initial supply to the deployer so they can initialize the Uniswap trading pair
        _mint(_msgSender(), totalSupply_);
    }

    // Function to burn tokens
    function burn(uint256 amount) public override(ERC20Burnable) onlyOwner {
        super.burn(amount);
    }

    // Function to burn tokens from a specific account
    function burnFrom(address account, uint256 amount) public override(ERC20Burnable) onlyOwner {
        super.burnFrom(account, amount);
    }
}
// File: WarheadToken.sol


pragma solidity ^0.8.7;

// Imports



contract WarheadToken is ERC20Burnable, Ownable {
    constructor(string memory name_, string memory symbol_, uint256 initialSupply_, address owner_)
        ERC20(name_, symbol_)
        Ownable(owner_)
    {
        // Mint initial supply to the deployer so he can initialize the Uniswap trading pair
        _mint(_msgSender(), initialSupply_);
    }

    function mint(address to, uint256 amount) external onlyOwner {
        _mint(to, amount);
    }

    // Function to burn tokens
    function burn(uint256 amount) public override(ERC20Burnable) {
        super.burn(amount);
    }

    // Function to burn tokens from a specific account
    function burnFrom(address account, uint256 amount) public override(ERC20Burnable) onlyOwner {
        super.burnFrom(account, amount);
    }
}
// File: @openzeppelin/contracts/utils/ReentrancyGuard.sol


// OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuard.sol)

pragma solidity ^0.8.20;

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

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

    uint256 private _status;

    /**
     * @dev Unauthorized reentrant call.
     */
    error ReentrancyGuardReentrantCall();

    constructor() {
        _status = NOT_ENTERED;
    }

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

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be NOT_ENTERED
        if (_status == ENTERED) {
            revert ReentrancyGuardReentrantCall();
        }

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

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

    /**
     * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
     * `nonReentrant` function in the call stack.
     */
    function _reentrancyGuardEntered() internal view returns (bool) {
        return _status == ENTERED;
    }
}

// File: WeaponsMarket.sol


pragma solidity ^0.8.7;

// Imports






interface INukeTheSupply {
    function isOperationsPhaseEnded() external view returns (bool);
}

contract WeaponsMarket is Ownable, ReentrancyGuard {
    using SafeERC20 for IERC20;

    // Token addresses
    IERC20 public ICBM;
    IERC20 public Warhead;

    INukeTheSupply public nukeTheSupply;

    // Auction parameters
    uint256 public auctionCounter; // added auction counter
    uint256 public constant AUCTION_DURATION = 24 hours;
    uint256 public auctionQuantity;
    bool public auctionQuantitySet;
    bool public started;
    bool public ended;
    uint256 public endAt;
    address public highestBidder;
    uint256 public highestBid;

// (re-did way auction data is stored, needed for proper withdraw mechanic)

    struct BidInfo {
        uint256 amount;
        uint256 auctionId;
    }

    mapping(address => BidInfo) public bids;

    // Events
    event AuctionQuantitySet(uint256 quantity);
    event AuctionStarted(address indexed starter, uint256 bid, uint256 endAt);
    event BidPlaced(address indexed bidder, uint256 amount);
    event BidWithdrawn(address indexed bidder, uint256 amount);
    event AuctionEnded(
        address indexed winner,
        uint256 bidAmount,
        uint256 icbmAmount
    );

    constructor(
        address icbm_,
        address warhead_,
        address nukeTheSupply_,
        address owner_
    ) Ownable(owner_) {
        ICBM = IERC20(icbm_);
        Warhead = IERC20(warhead_);
        nukeTheSupply = INukeTheSupply(nukeTheSupply_);
    }

    function setAuctionQuantity() external {
        require(!auctionQuantitySet, "Quantity already set");
        require(
            nukeTheSupply.isOperationsPhaseEnded(),
            "Operations phase not ended"
        );
        uint256 totalICBM = ICBM.balanceOf(address(this));
        require(totalICBM > 0, "No ICBM tokens in pool");
        auctionQuantity = totalICBM / 100;
        auctionQuantitySet = true;
        emit AuctionQuantitySet(auctionQuantity);
    }

    function startAuction(uint256 bidAmount) external {
        require(
            bids[_msgSender()].amount == 0 ||
                bids[_msgSender()].auctionId < auctionCounter,
            "Withdraw previous bid first"
        );
        require(auctionQuantitySet, "Auction quantity not set");
        require(!started, "Auction already started");
        require(
            nukeTheSupply.isOperationsPhaseEnded(),
            "Operations phase not ended"
        );
        require(
            ICBM.balanceOf(address(this)) >= auctionQuantity,
            "Insufficient ICBM tokens"
        );
        require(bidAmount > 0, "Bid must be greater than 0");
        require(
            Warhead.allowance(_msgSender(), address(this)) >= bidAmount,
            "Insufficient Warhead allowance"
        );

        ended = false;

        Warhead.safeTransferFrom(_msgSender(), address(this), bidAmount);

        started = true;
        endAt = block.timestamp + AUCTION_DURATION;
        highestBidder = _msgSender();
        highestBid = bidAmount;
        auctionCounter++;

        bids[_msgSender()] = BidInfo(bidAmount, auctionCounter);

        emit AuctionStarted(_msgSender(), bidAmount, endAt);
    }

    function bid(uint256 bidAmount) external {
        require(
            bids[_msgSender()].amount == 0 ||
                bids[_msgSender()].auctionId < auctionCounter,
            "Withdraw previous bid first"
        );
        require(started, "Auction not started");
        require(block.timestamp < endAt, "Auction ended");
        require(bidAmount > highestBid, "Bid not higher than current highest");
        require(
            Warhead.allowance(_msgSender(), address(this)) >= bidAmount,
            "Insufficient Warhead allowance"
        );

        if (highestBidder != address(0)) {
            bids[highestBidder] = BidInfo(highestBid, auctionCounter);
        }

        Warhead.safeTransferFrom(_msgSender(), address(this), bidAmount);

        highestBidder = _msgSender();
        highestBid = bidAmount;
        bids[_msgSender()] = BidInfo(bidAmount, auctionCounter);

        emit BidPlaced(_msgSender(), bidAmount);
    }

function withdrawBid() external nonReentrant {
    BidInfo memory bidInfo = bids[_msgSender()];

    // Highest bidder cannot withdraw before auction ends AND is finalized
    require(
        _msgSender() != highestBidder || ended,
        "Highest bidder cannot withdraw"
    );
    require(bidInfo.amount > 0, "No bid to withdraw");

    bids[_msgSender()] = BidInfo(0, 0);
    Warhead.safeTransfer(_msgSender(), bidInfo.amount);

    emit BidWithdrawn(_msgSender(), bidInfo.amount);
}

    function endAuction() external nonReentrant {
        require(started, "Auction not started");
        require(block.timestamp >= endAt, "Auction not ended");
        require(!ended, "Auction already ended");

        ended = true;
        started = false;

        if (highestBidder != address(0)) {
            // Burn the Warhead tokens held by the contract
            WarheadToken(address(Warhead)).burn(highestBid);

            // Prevent withdrawal
            bids[highestBidder] = BidInfo(0, 0);

            // Transfer ICBM to winner
            ICBM.safeTransfer(highestBidder, auctionQuantity);

            emit AuctionEnded(highestBidder, highestBid, auctionQuantity);
        } else {
            emit AuctionEnded(address(0), 0, 0);
        }

        // Reset for next auction
        highestBidder = address(0);
        highestBid = 0;
    }

    function getICBMBalance() external view returns (uint256) {
        return ICBM.balanceOf(address(this));
    }

    function getWarheadBalance() external view returns (uint256) {
        return Warhead.balanceOf(address(this));
    }
}

// File: NukeTheSupply.sol


pragma solidity ^0.8.7;

// Imports







// Import ICBM & Warhead tokens (& WeaponsMarket)




contract NukeTheSupply is Ownable {
    using SafeERC20 for IERC20;

    // Tokens used in contract
    ICBMToken public ICBM;
    WarheadToken public Warhead;
    address public weaponsMarket; // State variable for WeaponsMarket contract address

    // Token supply values - there were changes in WH supply, operations phase is now 100 days, default sell is 3.5M
    uint256 public constant ICBM_TOKEN_TOTAL_SUPPLY = 500_000_000 ether; // 500 million
    uint256 public constant INITIAL_WARHEAD_TOKEN_SUPPLY = 1_000_000 ether; // a million
    uint256 public NTS_CONTRACT_ICBM_BALANCE = 350_000_000 ether; // 350 million
    uint256 public constant DAILY_ICBM_SELL_AMOUNT = 3_500_000 ether; // 3.5 million per day

    // Token values
    uint256 public totalArmedICBMAmount; // Total amount of user supplied tokens in "ARM" state
    uint256 public totalICBMTokensBurned; // Total amount of ICBM tokens burned by users with "nuke" function, since deployment
    uint256 public totalICMBTokensSold; // Total amount of ICBM tokens sold by this contract, since deployment
    uint256 public day; // Day counter variable - counting since deployment
    uint256 public deploymentTimestamp; // Used to set conditions for the first call to the sell function and contract phase control
    uint256 public nextSellTimestamp; // Used to enforce delay between subsequent sell calls
    uint256 public constant PREPARATION_DURATION = 48 hours; // Change to 2 minutes for testing purposes

    uint256 public constant OPERATIONS_DURATION = 101 days; // Time period during which the contract is selling ICBM tokens
    //(added one day extra due to users might call "Sell" with some minutes of delay after full 24 hours have passed since last one)
    uint256 public constant ARM_DURATION = 24 hours; // Time period during which ICBM tokens are armed
    uint256 public constant SELL_INTERVAL = 24 hours; // Time period between sell functions

    // Structs and mapping for user's batches of armed ICBM tokens
    struct ArmBatch {
        uint256 amount;
        uint256 endTime;
    }

    mapping(address => ArmBatch[]) public userArmBatches;

    // EVENTS
    event Armed(address indexed user, uint256 amount, uint256 endTime);
    event Nuked(
        address indexed user,
        uint256 icbmAmount,
        uint256 burnedAmount,
        uint256 whMinted
    );
    event SoldToWeaponsMarket(address indexed weaponsMarket, uint256 amount);

    // MODIFIER
    modifier inOperationsPhase() {
        require(
            block.timestamp >= deploymentTimestamp + PREPARATION_DURATION,
            "Operations phase not started"
        );
        //(added one more condition in this modifier, can't remeber exacly why, but it was neccessairy)
        require(
            block.timestamp <
                deploymentTimestamp +
                    OPERATIONS_DURATION +
                    PREPARATION_DURATION,
            "Operations phase over"
        );
        _;
    }

    constructor(address owner_) Ownable(owner_) {
        deploymentTimestamp = block.timestamp;
        day = 1;
        ICBM = new ICBMToken(
            "ICBM",
            "ICBM",
            ICBM_TOKEN_TOTAL_SUPPLY,
            address(this)
        );
        Warhead = new WarheadToken(
            "Warhead",
            "WH",
            INITIAL_WARHEAD_TOKEN_SUPPLY,
            address(this)
        );
        ICBM.transfer(
            owner(),
            ICBM_TOKEN_TOTAL_SUPPLY - NTS_CONTRACT_ICBM_BALANCE
        ); // Creator receives 150M ICBM tokens
        Warhead.transfer(owner(), INITIAL_WARHEAD_TOKEN_SUPPLY); // Creator receives the full initial WH supply
        //(placed deploy of weaponsMarket at the end of constructor, since it failed to deploy earlier)
        weaponsMarket = address(
            new WeaponsMarket(
                address(ICBM),
                address(Warhead),
                address(this),
                owner_
            )
        ); // Pass NukeTheSupply address
    }

    // =======================================================
    // ===============      MAIN FUNCTIONS      ==============
    // =======================================================

    /*
     * @dev: This function is called by the user to "ARM" their ICBM tokens.
     * The function checks if the user has enough ICBM tokens, and if so, it creates a new batch of armed ICBM tokens.
     * The function also transfers the ICBM tokens from the user to this contract.
     */
    function arm(uint256 amount_) external {
        require(day <= 99, "Arm phase over"); // Users end arming ICBM tokens after 99 days
        require(amount_ > 0, "Amount must be greater than 0");

        // Create new batch in memory
        ArmBatch memory newBatch = ArmBatch({
            amount: amount_,
            endTime: block.timestamp + ARM_DURATION
        });
        userArmBatches[_msgSender()].push(newBatch);
        totalArmedICBMAmount += amount_;

        // Transfer ICBM tokens from user to this contract
        require(
            ICBM.transferFrom(_msgSender(), address(this), amount_),
            "Transfer failed"
        ); // Users send their ICBM tokens to this contract

        // Emit event
        emit Armed(_msgSender(), amount_, block.timestamp + ARM_DURATION);
    }

    /*
     * @dev: This function is called by the user to "NUKE" their armed ICBM tokens.
     * The function checks if the batch is ready to be nuked, and if so, it returns the 'ARMED' ICBM tokens to the user,
     * while burning 10% of the ICBM tokens amount of the contracts balance.
     * The function also mints Warhead tokens to the user in a 1:1 ratio with the burned ICBM tokens.
     */
    function nuke() external {
        // Get the user's batches from storage
        ArmBatch[] storage userBatches = userArmBatches[_msgSender()];
        uint256 totalICBMToReturn = 0;
        uint256 totalICBMToBurn = 0;

        // Check if the user has any batches
        for (uint256 i = 0; i < userBatches.length; ) {
            // Check if the batch is ready to be nuked
            if (block.timestamp >= userBatches[i].endTime) {
                // Calculate the amount to burn and return ICBM tokens to user
                uint256 ICBMTokenAmount = userBatches[i].amount;
                uint256 burnAmount = ICBMTokenAmount / 10; // burn 10%
                totalICBMToReturn += ICBMTokenAmount;

                totalICBMToBurn += burnAmount; // Make sure contract holds enough tokens to burn

                // We track the contract's balance in a storage variable, since .balanceOf() would include user-armings too
                NTS_CONTRACT_ICBM_BALANCE -= burnAmount;
                totalICBMTokensBurned += burnAmount;
                totalArmedICBMAmount -= ICBMTokenAmount;

                // Emit event
                emit Nuked(
                    _msgSender(),
                    ICBMTokenAmount,
                    burnAmount,
                    burnAmount
                );

                // Remove the batch from storage
                userBatches[i] = userBatches[userBatches.length - 1];
                userBatches.pop();
            } else {
                i++;
            }
        }

        // Require that the user has at least one batch ready to be nuked
        require(totalICBMToReturn > 0, "No batches ready");
        // Transfer the ICBM tokens back to the user
        require(
            ICBM.transfer(_msgSender(), totalICBMToReturn),
            "Transfer failed"
        );
        // Burn the ICBM tokens
        ICBM.burn(totalICBMToBurn);
        // Mint Warhead tokens to the user in 1:1 ratio with burned ICBM
        Warhead.mint(_msgSender(), totalICBMToBurn);
    }

    /*
     * @dev: This function transfers ICBM tokens to WeaponsMarket smart contract
     */
    function sell() external inOperationsPhase {
        require(block.timestamp >= nextSellTimestamp, "Can not sell yet");
        require(day <= 100, "Sell period ended");
        require(weaponsMarket != address(0), "WeaponsMarket not set");
        uint256 dailySell = (DAILY_ICBM_SELL_AMOUNT * day) >
            (totalICMBTokensSold + totalICBMTokensBurned)
            ? (DAILY_ICBM_SELL_AMOUNT * day) -
                (totalICMBTokensSold + totalICBMTokensBurned)
            : 0;

        if (dailySell > 0 && dailySell <= NTS_CONTRACT_ICBM_BALANCE) {
            NTS_CONTRACT_ICBM_BALANCE -= dailySell;
            totalICMBTokensSold += dailySell;

            // Transfer ICBM tokens to WeaponsMarket contract
            IERC20(address(ICBM)).safeTransfer(weaponsMarket, dailySell);
            emit SoldToWeaponsMarket(weaponsMarket, dailySell);

            // Reward the caller with 0.001% of the current WH supply
            uint256 warheadTokenSupply = Warhead.totalSupply();
            uint256 rewardAmount = warheadTokenSupply / 100_000;
            if (rewardAmount > 0) {
                Warhead.mint(_msgSender(), rewardAmount);
            }
        }
        // State updates
        day++; // Increment day for next sell calculation
        nextSellTimestamp = block.timestamp + SELL_INTERVAL; // Set next allowed sell timestamp
    }

    // =======================================================
    // ===============      VIEW FUNCTIONS      ==============
    // =======================================================

    // Returns true if the operations phase has ended
    function isOperationsPhaseEnded() external view returns (bool) {
        return
            block.timestamp >=
            deploymentTimestamp + OPERATIONS_DURATION + PREPARATION_DURATION;
    }

    // Fetch the address of the ICBM token
    function getICBMTokenAddress() public view returns (address) {
        return address(ICBM);
    }

    // Fetch the address of the Warhead token
    function getWarheadTokenAddress() public view returns (address) {
        return address(Warhead);
    }

    // Fetch the address of the WeaponsMarket contract
    function getWeaponsMarket() public view returns (address) {
        return weaponsMarket;
    }

    // Get the amount of ICBM tokens user has in ARM mode
    function getUserArmedICBM(address user) external view returns (uint256) {
        // ICBM tokens in ARM mode
        ArmBatch[] storage batches = userArmBatches[user];
        uint256 totalArmed;
        for (uint256 i = 0; i < batches.length; i++) {
            totalArmed += batches[i].amount;
        }
        return totalArmed;
    }

    // Get the amount of ICBM tokens user has ready to be "NUKE"
    function getUserReadyToNuke(address user) external view returns (uint256) {
        // ICBM tokens user is ready to "NUKE"
        ArmBatch[] storage batches = userArmBatches[user];
        uint256 totalReady;
        for (uint256 i = 0; i < batches.length; i++) {
            if (block.timestamp >= batches[i].endTime) {
                totalReady += batches[i].amount;
            }
        }
        return totalReady;
    }

    function getTotalBurned() external view returns (uint256) {
        return totalICBMTokensBurned;
    }

    function getTotalSold() external view returns (uint256) {
        return totalICMBTokensSold;
    }

    function getCurrentDay() external view returns (uint256) {
        return day;
    }

    function getRemainingSupply() external view returns (uint256) {
        return NTS_CONTRACT_ICBM_BALANCE;
    }

    function getDailySell() external view returns (uint256) {
        return
            (DAILY_ICBM_SELL_AMOUNT * day) >
                (totalICMBTokensSold + totalICBMTokensBurned)
                ? (DAILY_ICBM_SELL_AMOUNT * day) -
                    (totalICMBTokensSold + totalICBMTokensBurned)
                : 0;
    }
}
        

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"owner_","internalType":"address"}]},{"type":"error","name":"OwnableInvalidOwner","inputs":[{"type":"address","name":"owner","internalType":"address"}]},{"type":"error","name":"OwnableUnauthorizedAccount","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"error","name":"SafeERC20FailedOperation","inputs":[{"type":"address","name":"token","internalType":"address"}]},{"type":"event","name":"Armed","inputs":[{"type":"address","name":"user","internalType":"address","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false},{"type":"uint256","name":"endTime","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Nuked","inputs":[{"type":"address","name":"user","internalType":"address","indexed":true},{"type":"uint256","name":"icbmAmount","internalType":"uint256","indexed":false},{"type":"uint256","name":"burnedAmount","internalType":"uint256","indexed":false},{"type":"uint256","name":"whMinted","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"SoldToWeaponsMarket","inputs":[{"type":"address","name":"weaponsMarket","internalType":"address","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"ARM_DURATION","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"DAILY_ICBM_SELL_AMOUNT","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract ICBMToken"}],"name":"ICBM","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"ICBM_TOKEN_TOTAL_SUPPLY","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"INITIAL_WARHEAD_TOKEN_SUPPLY","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"NTS_CONTRACT_ICBM_BALANCE","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"OPERATIONS_DURATION","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"PREPARATION_DURATION","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"SELL_INTERVAL","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract WarheadToken"}],"name":"Warhead","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"arm","inputs":[{"type":"uint256","name":"amount_","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"day","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"deploymentTimestamp","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getCurrentDay","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getDailySell","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"getICBMTokenAddress","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getRemainingSupply","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getTotalBurned","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getTotalSold","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getUserArmedICBM","inputs":[{"type":"address","name":"user","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getUserReadyToNuke","inputs":[{"type":"address","name":"user","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"getWarheadTokenAddress","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"getWeaponsMarket","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isOperationsPhaseEnded","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"nextSellTimestamp","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"nuke","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"sell","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalArmedICBMAmount","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalICBMTokensBurned","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalICMBTokensSold","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"amount","internalType":"uint256"},{"type":"uint256","name":"endTime","internalType":"uint256"}],"name":"userArmBatches","inputs":[{"type":"address","name":"","internalType":"address"},{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"weaponsMarket","inputs":[]}]
              

Contract Creation Code

Verify & Publish
0x60806040526b0121836204bc2ce21e00000060045534801562000020575f80fd5b5060405162009375380380620093758339818101604052810190620000469190620005a1565b805f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603620000ba575f6040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401620000b19190620005e2565b60405180910390fd5b620000cb816200042a60201b60201c565b504260098190555060016008819055506b019d971e4fe8401e7400000030604051620000f79062000512565b6200010492919062000675565b604051809103905ff0801580156200011e573d5f803e3d5ffd5b5060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555069d3c21bcecceda100000030604051620001789062000520565b6200018592919062000766565b604051809103905ff0801580156200019f573d5f803e3d5ffd5b5060025f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6200022c620004eb60201b60201c565b6004546b019d971e4fe8401e74000000620002489190620007e8565b6040518363ffffffff1660e01b81526004016200026792919062000822565b6020604051808303815f875af115801562000284573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190620002aa919062000887565b5060025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb620002f8620004eb60201b60201c565b69d3c21bcecceda10000006040518363ffffffff1660e01b81526004016200032292919062000822565b6020604051808303815f875af11580156200033f573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019062000365919062000887565b5060015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff163083604051620003ba906200052e565b620003c99493929190620008b7565b604051809103905ff080158015620003e3573d5f803e3d5ffd5b5060035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505062000902565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b611d4c8062002b3383390190565b611e00806200487f83390190565b612cf6806200667f83390190565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6200056b8262000540565b9050919050565b6200057d816200055f565b811462000588575f80fd5b50565b5f815190506200059b8162000572565b92915050565b5f60208284031215620005b957620005b86200053c565b5b5f620005c8848285016200058b565b91505092915050565b620005dc816200055f565b82525050565b5f602082019050620005f75f830184620005d1565b92915050565b5f82825260208201905092915050565b7f4943424d000000000000000000000000000000000000000000000000000000005f82015250565b5f62000643600483620005fd565b915062000650826200060d565b602082019050919050565b5f819050919050565b6200066f816200065b565b82525050565b5f6080820190508181035f8301526200068e8162000635565b90508181036020830152620006a38162000635565b9050620006b4604083018562000664565b620006c36060830184620005d1565b9392505050565b7f57617268656164000000000000000000000000000000000000000000000000005f82015250565b5f62000700600783620005fd565b91506200070d82620006ca565b602082019050919050565b7f57480000000000000000000000000000000000000000000000000000000000005f82015250565b5f6200074e600283620005fd565b91506200075b8262000718565b602082019050919050565b5f6080820190508181035f8301526200077f81620006f2565b90508181036020830152620007948162000740565b9050620007a5604083018562000664565b620007b46060830184620005d1565b9392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f620007f4826200065b565b915062000801836200065b565b92508282039050818111156200081c576200081b620007bb565b5b92915050565b5f604082019050620008375f830185620005d1565b62000846602083018462000664565b9392505050565b5f8115159050919050565b62000863816200084d565b81146200086e575f80fd5b50565b5f81519050620008818162000858565b92915050565b5f602082840312156200089f576200089e6200053c565b5b5f620008ae8482850162000871565b91505092915050565b5f608082019050620008cc5f830187620005d1565b620008db6020830186620005d1565b620008ea6040830185620005d1565b620008f96060830184620005d1565b95945050505050565b61222380620009105f395ff3fe608060405234801561000f575f80fd5b506004361061020e575f3560e01c80637f81801f11610123578063c2729ea0116100ab578063f097db261161007a578063f097db261461058f578063f1631496146105ad578063f2fde38b146105cb578063f898e5ec146105e7578063f9f26041146106055761020e565b8063c2729ea014610517578063d2cc659e14610535578063dfd3ae3e14610553578063e4b7fb73146105715761020e565b80639ed1aa59116100f25780639ed1aa5914610471578063b55cd04b146104a1578063bbc914c1146104bf578063bc8fbbf8146104ef578063bfc12c05146104f95761020e565b80637f81801f146103f957806383d36e88146104175780638da5cb5b146104355780639d7b8e68146104535761020e565b80633174bdae116101a657806354cf274b1161017557806354cf274b1461037757806369347d65146103955780636df86445146103b3578063715018a6146103d15780637b76ac91146103db5761020e565b80633174bdae146103135780633e6968b614610331578063457100741461034f5780634b2e8fe0146103595761020e565b806320c69c89116101e257806320c69c891461028a57806324677320146102a657806326a4702c146102c4578063300c5579146102e25761020e565b8062d76cea1461021257806312b7bbf8146102305780631c0ff5581461024e5780631e9268a31461026c575b5f80fd5b61021a610623565b60405161022791906118da565b60405180910390f35b610238610691565b60405161024591906118da565b60405180910390f35b6102566106a1565b60405161026391906118da565b60405180910390f35b6102746106a7565b6040516102819190611932565b60405180910390f35b6102a4600480360381019061029f9190611979565b6106cf565b005b6102ae610961565b6040516102bb91906118da565b60405180910390f35b6102cc610967565b6040516102d99190611932565b60405180910390f35b6102fc60048036038101906102f791906119ce565b61098c565b60405161030a929190611a0c565b60405180910390f35b61031b6109c6565b60405161032891906118da565b60405180910390f35b6103396109cd565b60405161034691906118da565b60405180910390f35b6103576109d6565b005b610361610e9e565b60405161036e91906118da565b60405180910390f35b61037f610ea4565b60405161038c91906118da565b60405180910390f35b61039d610eab565b6040516103aa9190611a8e565b60405180910390f35b6103bb610ed0565b6040516103c891906118da565b60405180910390f35b6103d9610ede565b005b6103e3610ef1565b6040516103f091906118da565b60405180910390f35b610401610ef7565b60405161040e9190611932565b60405180910390f35b61041f610f1f565b60405161042c9190611ac7565b60405180910390f35b61043d610f44565b60405161044a9190611932565b60405180910390f35b61045b610f6b565b60405161046891906118da565b60405180910390f35b61048b60048036038101906104869190611ae0565b610f74565b60405161049891906118da565b60405180910390f35b6104a9611014565b6040516104b691906118da565b60405180910390f35b6104d960048036038101906104d49190611ae0565b61101d565b6040516104e691906118da565b60405180910390f35b6104f76110e7565b005b61050161154d565b60405161050e91906118da565b60405180910390f35b61051f611553565b60405161052c9190611932565b60405180910390f35b61053d61157b565b60405161054a91906118da565b60405180910390f35b61055b611581565b60405161056891906118da565b60405180910390f35b610579611587565b60405161058691906118da565b60405180910390f35b610597611590565b6040516105a491906118da565b60405180910390f35b6105b5611597565b6040516105c291906118da565b60405180910390f35b6105e560048036038101906105e09190611ae0565b61159e565b005b6105ef611622565b6040516105fc9190611b25565b60405180910390f35b61060d61164a565b60405161061a91906118da565b60405180910390f35b5f6006546007546106349190611b6b565b6008546a02e5276153cd3fb380000061064d9190611b9e565b11610658575f61068c565b6006546007546106689190611b6b565b6008546a02e5276153cd3fb38000006106819190611b9e565b61068b9190611bdf565b5b905090565b6b019d971e4fe8401e7400000081565b60055481565b5f60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60636008541115610715576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161070c90611c6c565b60405180910390fd5b5f8111610757576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161074e90611cd4565b60405180910390fd5b5f604051806040016040528083815260200162015180426107789190611b6b565b8152509050600b5f610788611659565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081908060018154018082558091505060019003905f5260205f2090600202015f909190919091505f820151815f01556020820151816001015550508160055f82825461080d9190611b6b565b9250508190555060015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd610859611659565b30856040518463ffffffff1660e01b815260040161087993929190611cf2565b6020604051808303815f875af1158015610895573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108b99190611d51565b6108f8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108ef90611dc6565b60405180910390fd5b610900611659565b73ffffffffffffffffffffffffffffffffffffffff167f4a25d50dd87794a1d2729a07ceafc76781eee174bc22e8788ebab11c7f55668c8362015180426109479190611b6b565b604051610955929190611a0c565b60405180910390a25050565b60065481565b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600b602052815f5260405f2081815481106109a5575f80fd5b905f5260205f2090600202015f9150915050805f0154908060010154905082565b6201518081565b5f600854905090565b6202a3006009546109e79190611b6b565b421015610a29576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a2090611e2e565b60405180910390fd5b6202a30062852780600954610a3e9190611b6b565b610a489190611b6b565b4210610a89576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a8090611e96565b60405180910390fd5b600a54421015610ace576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ac590611efe565b60405180910390fd5b60646008541115610b14576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b0b90611f66565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff1660035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610ba3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b9a90611fce565b60405180910390fd5b5f600654600754610bb49190611b6b565b6008546a02e5276153cd3fb3800000610bcd9190611b9e565b11610bd8575f610c0c565b600654600754610be89190611b6b565b6008546a02e5276153cd3fb3800000610c019190611b9e565b610c0b9190611bdf565b5b90505f81118015610c1f57506004548111155b15610e6f578060045f828254610c359190611bdf565b925050819055508060075f828254610c4d9190611b6b565b92505081905550610cc160035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff168260015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166116609092919063ffffffff16565b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167fae2935f93ee0e85030e93ff4394b2da3a7d462a70ff9132a97ddef7cc7dd5ce182604051610d2891906118da565b60405180910390a25f60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d9b573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610dbf9190612000565b90505f620186a082610dd19190612058565b90505f811115610e6c5760025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f19610e20611659565b836040518363ffffffff1660e01b8152600401610e3e929190612088565b5f604051808303815f87803b158015610e55575f80fd5b505af1158015610e67573d5f803e3d5ffd5b505050505b50505b60085f815480929190610e81906120af565b91905055506201518042610e959190611b6b565b600a8190555050565b60045481565b6201518081565b60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b69d3c21bcecceda100000081565b610ee66116df565b610eef5f611766565b565b60085481565b5f60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f600754905090565b5f80600b5f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2090505f805f90505b828054905081101561100957828181548110610fda57610fd96120f6565b5b905f5260205f2090600202015f015482610ff49190611b6b565b91508080611001906120af565b915050610fbb565b508092505050919050565b5f600654905090565b5f80600b5f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2090505f805f90505b82805490508110156110dc57828181548110611083576110826120f6565b5b905f5260205f2090600202016001015442106110c9578281815481106110ac576110ab6120f6565b5b905f5260205f2090600202015f0154826110c69190611b6b565b91505b80806110d4906120af565b915050611064565b508092505050919050565b5f600b5f6110f3611659565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2090505f805f5b838054905081101561130c57838181548110611151576111506120f6565b5b905f5260205f2090600202016001015442106112f8575f84828154811061117b5761117a6120f6565b5b905f5260205f2090600202015f015490505f600a8261119a9190612058565b905081856111a89190611b6b565b945080846111b69190611b6b565b93508060045f8282546111c99190611bdf565b925050819055508060065f8282546111e19190611b6b565b925050819055508160055f8282546111f99190611bdf565b92505081905550611208611659565b73ffffffffffffffffffffffffffffffffffffffff167f53e4c84cbbd880ccd53f5f64e9eb4882e8062c9b8198f8d829c235fa228c088683838460405161125193929190612123565b60405180910390a2856001878054905061126b9190611bdf565b8154811061127c5761127b6120f6565b5b905f5260205f20906002020186848154811061129b5761129a6120f6565b5b905f5260205f2090600202015f820154815f015560018201548160010155905050858054806112cd576112cc612158565b5b600190038181905f5260205f2090600202015f8082015f9055600182015f9055505090555050611307565b8080611303906120af565b9150505b611132565b505f821161134f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611346906121cf565b60405180910390fd5b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb611394611659565b846040518363ffffffff1660e01b81526004016113b2929190612088565b6020604051808303815f875af11580156113ce573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906113f29190611d51565b611431576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161142890611dc6565b60405180910390fd5b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166342966c68826040518263ffffffff1660e01b815260040161148b91906118da565b5f604051808303815f87803b1580156114a2575f80fd5b505af11580156114b4573d5f803e3d5ffd5b5050505060025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f196114fd611659565b836040518363ffffffff1660e01b815260040161151b929190612088565b5f604051808303815f87803b158015611532575f80fd5b505af1158015611544573d5f803e3d5ffd5b50505050505050565b60095481565b5f60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60075481565b600a5481565b5f600454905090565b6285278081565b6202a30081565b6115a66116df565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611616575f6040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260040161160d9190611932565b60405180910390fd5b61161f81611766565b50565b5f6202a300628527806009546116389190611b6b565b6116429190611b6b565b421015905090565b6a02e5276153cd3fb380000081565b5f33905090565b6116da838473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8585604051602401611693929190612088565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611827565b505050565b6116e7611659565b73ffffffffffffffffffffffffffffffffffffffff16611705610f44565b73ffffffffffffffffffffffffffffffffffffffff161461176457611728611659565b6040517f118cdaa700000000000000000000000000000000000000000000000000000000815260040161175b9190611932565b60405180910390fd5b565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f8060205f8451602086015f885af180611846576040513d5f823e3d81fd5b3d92505f519150505f821461185f57600181141561187a565b5f8473ffffffffffffffffffffffffffffffffffffffff163b145b156118bc57836040517f5274afe70000000000000000000000000000000000000000000000000000000081526004016118b39190611932565b60405180910390fd5b50505050565b5f819050919050565b6118d4816118c2565b82525050565b5f6020820190506118ed5f8301846118cb565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61191c826118f3565b9050919050565b61192c81611912565b82525050565b5f6020820190506119455f830184611923565b92915050565b5f80fd5b611958816118c2565b8114611962575f80fd5b50565b5f813590506119738161194f565b92915050565b5f6020828403121561198e5761198d61194b565b5b5f61199b84828501611965565b91505092915050565b6119ad81611912565b81146119b7575f80fd5b50565b5f813590506119c8816119a4565b92915050565b5f80604083850312156119e4576119e361194b565b5b5f6119f1858286016119ba565b9250506020611a0285828601611965565b9150509250929050565b5f604082019050611a1f5f8301856118cb565b611a2c60208301846118cb565b9392505050565b5f819050919050565b5f611a56611a51611a4c846118f3565b611a33565b6118f3565b9050919050565b5f611a6782611a3c565b9050919050565b5f611a7882611a5d565b9050919050565b611a8881611a6e565b82525050565b5f602082019050611aa15f830184611a7f565b92915050565b5f611ab182611a5d565b9050919050565b611ac181611aa7565b82525050565b5f602082019050611ada5f830184611ab8565b92915050565b5f60208284031215611af557611af461194b565b5b5f611b02848285016119ba565b91505092915050565b5f8115159050919050565b611b1f81611b0b565b82525050565b5f602082019050611b385f830184611b16565b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f611b75826118c2565b9150611b80836118c2565b9250828201905080821115611b9857611b97611b3e565b5b92915050565b5f611ba8826118c2565b9150611bb3836118c2565b9250828202611bc1816118c2565b91508282048414831517611bd857611bd7611b3e565b5b5092915050565b5f611be9826118c2565b9150611bf4836118c2565b9250828203905081811115611c0c57611c0b611b3e565b5b92915050565b5f82825260208201905092915050565b7f41726d207068617365206f7665720000000000000000000000000000000000005f82015250565b5f611c56600e83611c12565b9150611c6182611c22565b602082019050919050565b5f6020820190508181035f830152611c8381611c4a565b9050919050565b7f416d6f756e74206d7573742062652067726561746572207468616e20300000005f82015250565b5f611cbe601d83611c12565b9150611cc982611c8a565b602082019050919050565b5f6020820190508181035f830152611ceb81611cb2565b9050919050565b5f606082019050611d055f830186611923565b611d126020830185611923565b611d1f60408301846118cb565b949350505050565b611d3081611b0b565b8114611d3a575f80fd5b50565b5f81519050611d4b81611d27565b92915050565b5f60208284031215611d6657611d6561194b565b5b5f611d7384828501611d3d565b91505092915050565b7f5472616e73666572206661696c656400000000000000000000000000000000005f82015250565b5f611db0600f83611c12565b9150611dbb82611d7c565b602082019050919050565b5f6020820190508181035f830152611ddd81611da4565b9050919050565b7f4f7065726174696f6e73207068617365206e6f742073746172746564000000005f82015250565b5f611e18601c83611c12565b9150611e2382611de4565b602082019050919050565b5f6020820190508181035f830152611e4581611e0c565b9050919050565b7f4f7065726174696f6e73207068617365206f76657200000000000000000000005f82015250565b5f611e80601583611c12565b9150611e8b82611e4c565b602082019050919050565b5f6020820190508181035f830152611ead81611e74565b9050919050565b7f43616e206e6f742073656c6c20796574000000000000000000000000000000005f82015250565b5f611ee8601083611c12565b9150611ef382611eb4565b602082019050919050565b5f6020820190508181035f830152611f1581611edc565b9050919050565b7f53656c6c20706572696f6420656e6465640000000000000000000000000000005f82015250565b5f611f50601183611c12565b9150611f5b82611f1c565b602082019050919050565b5f6020820190508181035f830152611f7d81611f44565b9050919050565b7f576561706f6e734d61726b6574206e6f742073657400000000000000000000005f82015250565b5f611fb8601583611c12565b9150611fc382611f84565b602082019050919050565b5f6020820190508181035f830152611fe581611fac565b9050919050565b5f81519050611ffa8161194f565b92915050565b5f602082840312156120155761201461194b565b5b5f61202284828501611fec565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f612062826118c2565b915061206d836118c2565b92508261207d5761207c61202b565b5b828204905092915050565b5f60408201905061209b5f830185611923565b6120a860208301846118cb565b9392505050565b5f6120b9826118c2565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036120eb576120ea611b3e565b5b600182019050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f6060820190506121365f8301866118cb565b61214360208301856118cb565b61215060408301846118cb565b949350505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603160045260245ffd5b7f4e6f2062617463686573207265616479000000000000000000000000000000005f82015250565b5f6121b9601083611c12565b91506121c482612185565b602082019050919050565b5f6020820190508181035f8301526121e6816121ad565b905091905056fea2646970667358221220f5ac58839542b452caa1893b8385cc217c01a91d62252b30c820dd38208061ed64736f6c63430008140033608060405234801562000010575f80fd5b5060405162001d4c38038062001d4c8339818101604052810190620000369190620006a5565b80848481600390816200004a919062000980565b5080600490816200005c919062000980565b5050505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603620000d2575f6040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401620000c9919062000a75565b60405180910390fd5b620000e3816200010f60201b60201c565b5062000105620000f8620001d260201b60201c565b83620001d960201b60201c565b5050505062000b5e565b5f60055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160055f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f33905090565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036200024c575f6040517fec442f0500000000000000000000000000000000000000000000000000000000815260040162000243919062000a75565b60405180910390fd5b6200025f5f83836200026360201b60201c565b5050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603620002b7578060025f828254620002aa919062000abd565b9250508190555062000388565b5f805f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205490508181101562000343578381836040517fe450d38c0000000000000000000000000000000000000000000000000000000081526004016200033a9392919062000b08565b60405180910390fd5b8181035f808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550505b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603620003d1578060025f82825403925050819055506200041b565b805f808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055505b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516200047a919062000b43565b60405180910390a3505050565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b620004e882620004a0565b810181811067ffffffffffffffff821117156200050a5762000509620004b0565b5b80604052505050565b5f6200051e62000487565b90506200052c8282620004dd565b919050565b5f67ffffffffffffffff8211156200054e576200054d620004b0565b5b6200055982620004a0565b9050602081019050919050565b5f5b838110156200058557808201518184015260208101905062000568565b5f8484015250505050565b5f620005a6620005a08462000531565b62000513565b905082815260208101848484011115620005c557620005c46200049c565b5b620005d284828562000566565b509392505050565b5f82601f830112620005f157620005f062000498565b5b81516200060384826020860162000590565b91505092915050565b5f819050919050565b62000620816200060c565b81146200062b575f80fd5b50565b5f815190506200063e8162000615565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6200066f8262000644565b9050919050565b620006818162000663565b81146200068c575f80fd5b50565b5f815190506200069f8162000676565b92915050565b5f805f8060808587031215620006c057620006bf62000490565b5b5f85015167ffffffffffffffff811115620006e057620006df62000494565b5b620006ee87828801620005da565b945050602085015167ffffffffffffffff81111562000712576200071162000494565b5b6200072087828801620005da565b935050604062000733878288016200062e565b925050606062000746878288016200068f565b91505092959194509250565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680620007a157607f821691505b602082108103620007b757620007b66200075c565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026200081b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82620007de565b620008278683620007de565b95508019841693508086168417925050509392505050565b5f819050919050565b5f62000868620008626200085c846200060c565b6200083f565b6200060c565b9050919050565b5f819050919050565b620008838362000848565b6200089b62000892826200086f565b848454620007ea565b825550505050565b5f90565b620008b1620008a3565b620008be81848462000878565b505050565b5b81811015620008e557620008d95f82620008a7565b600181019050620008c4565b5050565b601f8211156200093457620008fe81620007bd565b6200090984620007cf565b8101602085101562000919578190505b620009316200092885620007cf565b830182620008c3565b50505b505050565b5f82821c905092915050565b5f620009565f198460080262000939565b1980831691505092915050565b5f62000970838362000945565b9150826002028217905092915050565b6200098b8262000752565b67ffffffffffffffff811115620009a757620009a6620004b0565b5b620009b3825462000789565b620009c0828285620008e9565b5f60209050601f831160018114620009f6575f8415620009e1578287015190505b620009ed858262000963565b86555062000a5c565b601f19841662000a0686620007bd565b5f5b8281101562000a2f5784890151825560018201915060208501945060208101905062000a08565b8683101562000a4f578489015162000a4b601f89168262000945565b8355505b6001600288020188555050505b505050505050565b62000a6f8162000663565b82525050565b5f60208201905062000a8a5f83018462000a64565b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f62000ac9826200060c565b915062000ad6836200060c565b925082820190508082111562000af15762000af062000a90565b5b92915050565b62000b02816200060c565b82525050565b5f60608201905062000b1d5f83018662000a64565b62000b2c602083018562000af7565b62000b3b604083018462000af7565b949350505050565b5f60208201905062000b585f83018462000af7565b92915050565b6111e08062000b6c5f395ff3fe608060405234801561000f575f80fd5b50600436106100e8575f3560e01c8063715018a61161008a57806395d89b411161006457806395d89b4114610236578063a9059cbb14610254578063dd62ed3e14610284578063f2fde38b146102b4576100e8565b8063715018a6146101f257806379cc6790146101fc5780638da5cb5b14610218576100e8565b806323b872dd116100c657806323b872dd14610158578063313ce5671461018857806342966c68146101a657806370a08231146101c2576100e8565b806306fdde03146100ec578063095ea7b31461010a57806318160ddd1461013a575b5f80fd5b6100f46102d0565b6040516101019190610e2e565b60405180910390f35b610124600480360381019061011f9190610edf565b610360565b6040516101319190610f37565b60405180910390f35b610142610382565b60405161014f9190610f5f565b60405180910390f35b610172600480360381019061016d9190610f78565b61038b565b60405161017f9190610f37565b60405180910390f35b6101906103b9565b60405161019d9190610fe3565b60405180910390f35b6101c060048036038101906101bb9190610ffc565b6103c1565b005b6101dc60048036038101906101d79190611027565b6103d5565b6040516101e99190610f5f565b60405180910390f35b6101fa61041a565b005b61021660048036038101906102119190610edf565b61042d565b005b610220610443565b60405161022d9190611061565b60405180910390f35b61023e61046b565b60405161024b9190610e2e565b60405180910390f35b61026e60048036038101906102699190610edf565b6104fb565b60405161027b9190610f37565b60405180910390f35b61029e6004803603810190610299919061107a565b61051d565b6040516102ab9190610f5f565b60405180910390f35b6102ce60048036038101906102c99190611027565b61059f565b005b6060600380546102df906110e5565b80601f016020809104026020016040519081016040528092919081815260200182805461030b906110e5565b80156103565780601f1061032d57610100808354040283529160200191610356565b820191905f5260205f20905b81548152906001019060200180831161033957829003601f168201915b5050505050905090565b5f8061036a610623565b905061037781858561062a565b600191505092915050565b5f600254905090565b5f80610395610623565b90506103a285828561063c565b6103ad8585856106cf565b60019150509392505050565b5f6012905090565b6103c96107bf565b6103d281610846565b50565b5f805f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b6104226107bf565b61042b5f61085a565b565b6104356107bf565b61043f828261091d565b5050565b5f60055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606004805461047a906110e5565b80601f01602080910402602001604051908101604052809291908181526020018280546104a6906110e5565b80156104f15780601f106104c8576101008083540402835291602001916104f1565b820191905f5260205f20905b8154815290600101906020018083116104d457829003601f168201915b5050505050905090565b5f80610505610623565b90506105128185856106cf565b600191505092915050565b5f60015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905092915050565b6105a76107bf565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610617575f6040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260040161060e9190611061565b60405180910390fd5b6106208161085a565b50565b5f33905090565b610637838383600161093d565b505050565b5f610647848461051d565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8110156106c957818110156106ba578281836040517ffb8f41b20000000000000000000000000000000000000000000000000000000081526004016106b193929190611115565b60405180910390fd5b6106c884848484035f61093d565b5b50505050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361073f575f6040517f96c6fd1e0000000000000000000000000000000000000000000000000000000081526004016107369190611061565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036107af575f6040517fec442f050000000000000000000000000000000000000000000000000000000081526004016107a69190611061565b60405180910390fd5b6107ba838383610b0c565b505050565b6107c7610623565b73ffffffffffffffffffffffffffffffffffffffff166107e5610443565b73ffffffffffffffffffffffffffffffffffffffff161461084457610808610623565b6040517f118cdaa700000000000000000000000000000000000000000000000000000000815260040161083b9190611061565b60405180910390fd5b565b610857610851610623565b82610d25565b50565b5f60055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160055f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b61092f82610929610623565b8361063c565b6109398282610d25565b5050565b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16036109ad575f6040517fe602df050000000000000000000000000000000000000000000000000000000081526004016109a49190611061565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610a1d575f6040517f94280d62000000000000000000000000000000000000000000000000000000008152600401610a149190611061565b60405180910390fd5b8160015f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508015610b06578273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051610afd9190610f5f565b60405180910390a35b50505050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610b5c578060025f828254610b509190611177565b92505081905550610c2a565b5f805f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905081811015610be5578381836040517fe450d38c000000000000000000000000000000000000000000000000000000008152600401610bdc93929190611115565b60405180910390fd5b8181035f808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550505b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610c71578060025f8282540392505081905550610cbb565b805f808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055505b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610d189190610f5f565b60405180910390a3505050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610d95575f6040517f96c6fd1e000000000000000000000000000000000000000000000000000000008152600401610d8c9190611061565b60405180910390fd5b610da0825f83610b0c565b5050565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015610ddb578082015181840152602081019050610dc0565b5f8484015250505050565b5f601f19601f8301169050919050565b5f610e0082610da4565b610e0a8185610dae565b9350610e1a818560208601610dbe565b610e2381610de6565b840191505092915050565b5f6020820190508181035f830152610e468184610df6565b905092915050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610e7b82610e52565b9050919050565b610e8b81610e71565b8114610e95575f80fd5b50565b5f81359050610ea681610e82565b92915050565b5f819050919050565b610ebe81610eac565b8114610ec8575f80fd5b50565b5f81359050610ed981610eb5565b92915050565b5f8060408385031215610ef557610ef4610e4e565b5b5f610f0285828601610e98565b9250506020610f1385828601610ecb565b9150509250929050565b5f8115159050919050565b610f3181610f1d565b82525050565b5f602082019050610f4a5f830184610f28565b92915050565b610f5981610eac565b82525050565b5f602082019050610f725f830184610f50565b92915050565b5f805f60608486031215610f8f57610f8e610e4e565b5b5f610f9c86828701610e98565b9350506020610fad86828701610e98565b9250506040610fbe86828701610ecb565b9150509250925092565b5f60ff82169050919050565b610fdd81610fc8565b82525050565b5f602082019050610ff65f830184610fd4565b92915050565b5f6020828403121561101157611010610e4e565b5b5f61101e84828501610ecb565b91505092915050565b5f6020828403121561103c5761103b610e4e565b5b5f61104984828501610e98565b91505092915050565b61105b81610e71565b82525050565b5f6020820190506110745f830184611052565b92915050565b5f80604083850312156110905761108f610e4e565b5b5f61109d85828601610e98565b92505060206110ae85828601610e98565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806110fc57607f821691505b60208210810361110f5761110e6110b8565b5b50919050565b5f6060820190506111285f830186611052565b6111356020830185610f50565b6111426040830184610f50565b949350505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61118182610eac565b915061118c83610eac565b92508282019050808211156111a4576111a361114a565b5b9291505056fea264697066735822122027a6e4532a4c683e6bd29b7a1f88639f27f53d51ea7ad3289056a194358ac7e664736f6c63430008140033608060405234801562000010575f80fd5b5060405162001e0038038062001e008339818101604052810190620000369190620006a5565b80848481600390816200004a919062000980565b5080600490816200005c919062000980565b5050505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603620000d2575f6040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401620000c9919062000a75565b60405180910390fd5b620000e3816200010f60201b60201c565b5062000105620000f8620001d260201b60201c565b83620001d960201b60201c565b5050505062000b5e565b5f60055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160055f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f33905090565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036200024c575f6040517fec442f0500000000000000000000000000000000000000000000000000000000815260040162000243919062000a75565b60405180910390fd5b6200025f5f83836200026360201b60201c565b5050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603620002b7578060025f828254620002aa919062000abd565b9250508190555062000388565b5f805f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205490508181101562000343578381836040517fe450d38c0000000000000000000000000000000000000000000000000000000081526004016200033a9392919062000b08565b60405180910390fd5b8181035f808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550505b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603620003d1578060025f82825403925050819055506200041b565b805f808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055505b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516200047a919062000b43565b60405180910390a3505050565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b620004e882620004a0565b810181811067ffffffffffffffff821117156200050a5762000509620004b0565b5b80604052505050565b5f6200051e62000487565b90506200052c8282620004dd565b919050565b5f67ffffffffffffffff8211156200054e576200054d620004b0565b5b6200055982620004a0565b9050602081019050919050565b5f5b838110156200058557808201518184015260208101905062000568565b5f8484015250505050565b5f620005a6620005a08462000531565b62000513565b905082815260208101848484011115620005c557620005c46200049c565b5b620005d284828562000566565b509392505050565b5f82601f830112620005f157620005f062000498565b5b81516200060384826020860162000590565b91505092915050565b5f819050919050565b62000620816200060c565b81146200062b575f80fd5b50565b5f815190506200063e8162000615565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6200066f8262000644565b9050919050565b620006818162000663565b81146200068c575f80fd5b50565b5f815190506200069f8162000676565b92915050565b5f805f8060808587031215620006c057620006bf62000490565b5b5f85015167ffffffffffffffff811115620006e057620006df62000494565b5b620006ee87828801620005da565b945050602085015167ffffffffffffffff81111562000712576200071162000494565b5b6200072087828801620005da565b935050604062000733878288016200062e565b925050606062000746878288016200068f565b91505092959194509250565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680620007a157607f821691505b602082108103620007b757620007b66200075c565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026200081b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82620007de565b620008278683620007de565b95508019841693508086168417925050509392505050565b5f819050919050565b5f62000868620008626200085c846200060c565b6200083f565b6200060c565b9050919050565b5f819050919050565b620008838362000848565b6200089b62000892826200086f565b848454620007ea565b825550505050565b5f90565b620008b1620008a3565b620008be81848462000878565b505050565b5b81811015620008e557620008d95f82620008a7565b600181019050620008c4565b5050565b601f8211156200093457620008fe81620007bd565b6200090984620007cf565b8101602085101562000919578190505b620009316200092885620007cf565b830182620008c3565b50505b505050565b5f82821c905092915050565b5f620009565f198460080262000939565b1980831691505092915050565b5f62000970838362000945565b9150826002028217905092915050565b6200098b8262000752565b67ffffffffffffffff811115620009a757620009a6620004b0565b5b620009b3825462000789565b620009c0828285620008e9565b5f60209050601f831160018114620009f6575f8415620009e1578287015190505b620009ed858262000963565b86555062000a5c565b601f19841662000a0686620007bd565b5f5b8281101562000a2f5784890151825560018201915060208501945060208101905062000a08565b8683101562000a4f578489015162000a4b601f89168262000945565b8355505b6001600288020188555050505b505050505050565b62000a6f8162000663565b82525050565b5f60208201905062000a8a5f83018462000a64565b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f62000ac9826200060c565b915062000ad6836200060c565b925082820190508082111562000af15762000af062000a90565b5b92915050565b62000b02816200060c565b82525050565b5f60608201905062000b1d5f83018662000a64565b62000b2c602083018562000af7565b62000b3b604083018462000af7565b949350505050565b5f60208201905062000b585f83018462000af7565b92915050565b6112948062000b6c5f395ff3fe608060405234801561000f575f80fd5b50600436106100f3575f3560e01c806370a082311161009557806395d89b411161006457806395d89b411461025d578063a9059cbb1461027b578063dd62ed3e146102ab578063f2fde38b146102db576100f3565b806370a08231146101e9578063715018a61461021957806379cc6790146102235780638da5cb5b1461023f576100f3565b806323b872dd116100d157806323b872dd14610163578063313ce5671461019357806340c10f19146101b157806342966c68146101cd576100f3565b806306fdde03146100f7578063095ea7b31461011557806318160ddd14610145575b5f80fd5b6100ff6102f7565b60405161010c9190610ee2565b60405180910390f35b61012f600480360381019061012a9190610f93565b610387565b60405161013c9190610feb565b60405180910390f35b61014d6103a9565b60405161015a9190611013565b60405180910390f35b61017d6004803603810190610178919061102c565b6103b2565b60405161018a9190610feb565b60405180910390f35b61019b6103e0565b6040516101a89190611097565b60405180910390f35b6101cb60048036038101906101c69190610f93565b6103e8565b005b6101e760048036038101906101e291906110b0565b6103fe565b005b61020360048036038101906101fe91906110db565b61040a565b6040516102109190611013565b60405180910390f35b61022161044f565b005b61023d60048036038101906102389190610f93565b610462565b005b610247610478565b6040516102549190611115565b60405180910390f35b6102656104a0565b6040516102729190610ee2565b60405180910390f35b61029560048036038101906102909190610f93565b610530565b6040516102a29190610feb565b60405180910390f35b6102c560048036038101906102c0919061112e565b610552565b6040516102d29190611013565b60405180910390f35b6102f560048036038101906102f091906110db565b6105d4565b005b60606003805461030690611199565b80601f016020809104026020016040519081016040528092919081815260200182805461033290611199565b801561037d5780601f106103545761010080835404028352916020019161037d565b820191905f5260205f20905b81548152906001019060200180831161036057829003601f168201915b5050505050905090565b5f80610391610658565b905061039e81858561065f565b600191505092915050565b5f600254905090565b5f806103bc610658565b90506103c9858285610671565b6103d4858585610704565b60019150509392505050565b5f6012905090565b6103f06107f4565b6103fa828261087b565b5050565b610407816108fa565b50565b5f805f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b6104576107f4565b6104605f61090e565b565b61046a6107f4565b61047482826109d1565b5050565b5f60055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6060600480546104af90611199565b80601f01602080910402602001604051908101604052809291908181526020018280546104db90611199565b80156105265780601f106104fd57610100808354040283529160200191610526565b820191905f5260205f20905b81548152906001019060200180831161050957829003601f168201915b5050505050905090565b5f8061053a610658565b9050610547818585610704565b600191505092915050565b5f60015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905092915050565b6105dc6107f4565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361064c575f6040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081526004016106439190611115565b60405180910390fd5b6106558161090e565b50565b5f33905090565b61066c83838360016109f1565b505050565b5f61067c8484610552565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8110156106fe57818110156106ef578281836040517ffb8f41b20000000000000000000000000000000000000000000000000000000081526004016106e6939291906111c9565b60405180910390fd5b6106fd84848484035f6109f1565b5b50505050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610774575f6040517f96c6fd1e00000000000000000000000000000000000000000000000000000000815260040161076b9190611115565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036107e4575f6040517fec442f050000000000000000000000000000000000000000000000000000000081526004016107db9190611115565b60405180910390fd5b6107ef838383610bc0565b505050565b6107fc610658565b73ffffffffffffffffffffffffffffffffffffffff1661081a610478565b73ffffffffffffffffffffffffffffffffffffffff16146108795761083d610658565b6040517f118cdaa70000000000000000000000000000000000000000000000000000000081526004016108709190611115565b60405180910390fd5b565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036108eb575f6040517fec442f050000000000000000000000000000000000000000000000000000000081526004016108e29190611115565b60405180910390fd5b6108f65f8383610bc0565b5050565b61090b610905610658565b82610dd9565b50565b5f60055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160055f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6109e3826109dd610658565b83610671565b6109ed8282610dd9565b5050565b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603610a61575f6040517fe602df05000000000000000000000000000000000000000000000000000000008152600401610a589190611115565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610ad1575f6040517f94280d62000000000000000000000000000000000000000000000000000000008152600401610ac89190611115565b60405180910390fd5b8160015f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508015610bba578273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051610bb19190611013565b60405180910390a35b50505050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610c10578060025f828254610c04919061122b565b92505081905550610cde565b5f805f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905081811015610c99578381836040517fe450d38c000000000000000000000000000000000000000000000000000000008152600401610c90939291906111c9565b60405180910390fd5b8181035f808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550505b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610d25578060025f8282540392505081905550610d6f565b805f808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055505b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610dcc9190611013565b60405180910390a3505050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610e49575f6040517f96c6fd1e000000000000000000000000000000000000000000000000000000008152600401610e409190611115565b60405180910390fd5b610e54825f83610bc0565b5050565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015610e8f578082015181840152602081019050610e74565b5f8484015250505050565b5f601f19601f8301169050919050565b5f610eb482610e58565b610ebe8185610e62565b9350610ece818560208601610e72565b610ed781610e9a565b840191505092915050565b5f6020820190508181035f830152610efa8184610eaa565b905092915050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610f2f82610f06565b9050919050565b610f3f81610f25565b8114610f49575f80fd5b50565b5f81359050610f5a81610f36565b92915050565b5f819050919050565b610f7281610f60565b8114610f7c575f80fd5b50565b5f81359050610f8d81610f69565b92915050565b5f8060408385031215610fa957610fa8610f02565b5b5f610fb685828601610f4c565b9250506020610fc785828601610f7f565b9150509250929050565b5f8115159050919050565b610fe581610fd1565b82525050565b5f602082019050610ffe5f830184610fdc565b92915050565b61100d81610f60565b82525050565b5f6020820190506110265f830184611004565b92915050565b5f805f6060848603121561104357611042610f02565b5b5f61105086828701610f4c565b935050602061106186828701610f4c565b925050604061107286828701610f7f565b9150509250925092565b5f60ff82169050919050565b6110918161107c565b82525050565b5f6020820190506110aa5f830184611088565b92915050565b5f602082840312156110c5576110c4610f02565b5b5f6110d284828501610f7f565b91505092915050565b5f602082840312156110f0576110ef610f02565b5b5f6110fd84828501610f4c565b91505092915050565b61110f81610f25565b82525050565b5f6020820190506111285f830184611106565b92915050565b5f806040838503121561114457611143610f02565b5b5f61115185828601610f4c565b925050602061116285828601610f4c565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806111b057607f821691505b6020821081036111c3576111c261116c565b5b50919050565b5f6060820190506111dc5f830186611106565b6111e96020830185611004565b6111f66040830184611004565b949350505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61123582610f60565b915061124083610f60565b9250828201905080821115611258576112576111fe565b5b9291505056fea2646970667358221220c7d0f864d1cfd32e56f7df91e73fc9b0cba1945fc08b61a2ce4c94f229bd81a164736f6c63430008140033608060405234801562000010575f80fd5b5060405162002cf638038062002cf68339818101604052810190620000369190620002b3565b805f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603620000aa575f6040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401620000a1919062000333565b60405180910390fd5b620000bb816200018d60201b60201c565b50600180819055508360025f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508260035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508160045f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050506200034e565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6200027d8262000252565b9050919050565b6200028f8162000271565b81146200029a575f80fd5b50565b5f81519050620002ad8162000284565b92915050565b5f805f8060808587031215620002ce57620002cd6200024e565b5b5f620002dd878288016200029d565b9450506020620002f0878288016200029d565b935050604062000303878288016200029d565b925050606062000316878288016200029d565b91505092959194509250565b6200032d8162000271565b82525050565b5f602082019050620003485f83018462000322565b92915050565b61299a806200035c5f395ff3fe608060405234801561000f575f80fd5b506004361061014b575f3560e01c80638da5cb5b116100c1578063b2d2f57d1161007a578063b2d2f57d14610320578063d0e5b1ab1461033e578063d57bde791461035c578063e2fefa3a1461037a578063f2fde38b14610398578063fe67a54b146103b45761014b565b80638da5cb5b146102805780638ee5775a1461029e57806391f90157146102a857806393832836146102c6578063a271e525146102e4578063a7e76644146103025761014b565b8063454a2ab311610113578063454a2ab3146101cf57806362ea82db146101eb57806369347d651461021c578063715018a61461023a5780637cc3ae8c1461024457806383d36e88146102625761014b565b8063065de74c1461014f57806312fa6feb1461016b5780631f2698ab1461018957806337271cc7146101a75780633cbbf73e146101b1575b5f80fd5b61016960048036038101906101649190611e2c565b6103be565b005b6101736109d7565b6040516101809190611e71565b60405180910390f35b6101916109ea565b60405161019e9190611e71565b60405180910390f35b6101af6109fd565b005b6101b9610c84565b6040516101c69190611e99565b60405180910390f35b6101e960048036038101906101e49190611e2c565b610d23565b005b61020560048036038101906102009190611f0c565b611205565b604051610213929190611f37565b60405180910390f35b610224611225565b6040516102319190611fb9565b60405180910390f35b61024261124a565b005b61024c61125d565b6040516102599190611e99565b60405180910390f35b61026a611263565b6040516102779190611fb9565b60405180910390f35b610288611288565b6040516102959190611fe1565b60405180910390f35b6102a66112af565b005b6102b0611512565b6040516102bd9190611fe1565b60405180910390f35b6102ce611537565b6040516102db9190611e99565b60405180910390f35b6102ec61153d565b6040516102f99190611e99565b60405180910390f35b61030a611544565b6040516103179190611e99565b60405180910390f35b61032861154a565b604051610335919061201a565b60405180910390f35b61034661156f565b6040516103539190611e99565b60405180910390f35b61036461160e565b6040516103719190611e99565b60405180910390f35b610382611614565b60405161038f9190611e71565b60405180910390f35b6103b260048036038101906103ad9190611f0c565b611626565b005b6103bc6116aa565b005b5f600b5f6103ca611abb565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f0154148061045a5750600554600b5f61041b611abb565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2060010154105b610499576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104909061208d565b60405180910390fd5b60075f9054906101000a900460ff166104e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104de906120f5565b60405180910390fd5b600760019054906101000a900460ff1615610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161052e9061215d565b60405180910390fd5b60045f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f898e5ec6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156105a1573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105c591906121a5565b610604576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105fb9061221a565b60405180910390fd5b60065460025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016106619190611fe1565b602060405180830381865afa15801561067c573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106a0919061224c565b10156106e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106d8906122c1565b60405180910390fd5b5f8111610723576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161071a90612329565b60405180910390fd5b8060035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e610769611abb565b306040518363ffffffff1660e01b8152600401610787929190612347565b602060405180830381865afa1580156107a2573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107c6919061224c565b1015610807576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107fe906123b8565b60405180910390fd5b5f600760026101000a81548160ff02191690831515021790555061087661082c611abb565b308360035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611ac2909392919063ffffffff16565b6001600760016101000a81548160ff02191690831515021790555062015180426108a09190612403565b6008819055506108ae611abb565b60095f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600a8190555060055f81548092919061090690612436565b91905055506040518060400160405280828152602001600554815250600b5f61092d611abb565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f820151815f015560208201518160010155905050610983611abb565b73ffffffffffffffffffffffffffffffffffffffff167f92db7303de5c78e58e4570f0b4acf392e3dac09394e96c4fa62b323b6337ee65826008546040516109cc929190611f37565b60405180910390a250565b600760029054906101000a900460ff1681565b600760019054906101000a900460ff1681565b610a05611b44565b5f600b5f610a11611abb565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206040518060400160405290815f8201548152602001600182015481525050905060095f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610aaa611abb565b73ffffffffffffffffffffffffffffffffffffffff16141580610ad95750600760029054906101000a900460ff165b610b18576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b0f906124c7565b60405180910390fd5b5f815f015111610b5d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b549061252f565b60405180910390fd5b60405180604001604052805f81526020015f815250600b5f610b7d611abb565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f820151815f015560208201518160010155905050610c21610bd6611abb565b825f015160035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611b8a9092919063ffffffff16565b610c29611abb565b73ffffffffffffffffffffffffffffffffffffffff167f03f0427e8bcfdf5f69217150cf160ebe2dac5fa607336fd7643bfd61a9019080825f0151604051610c719190611e99565b60405180910390a250610c82611c09565b565b5f60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610cdf9190611fe1565b602060405180830381865afa158015610cfa573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d1e919061224c565b905090565b5f600b5f610d2f611abb565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f01541480610dbf5750600554600b5f610d80611abb565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2060010154105b610dfe576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610df59061208d565b60405180910390fd5b600760019054906101000a900460ff16610e4d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e4490612597565b60405180910390fd5b6008544210610e91576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e88906125ff565b60405180910390fd5b600a548111610ed5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ecc9061268d565b60405180910390fd5b8060035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e610f1b611abb565b306040518363ffffffff1660e01b8152600401610f39929190612347565b602060405180830381865afa158015610f54573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f78919061224c565b1015610fb9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fb0906123b8565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff1660095f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461109a576040518060400160405280600a548152602001600554815250600b5f60095f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f820151815f0155602082015181600101559050505b6110ef6110a5611abb565b308360035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611ac2909392919063ffffffff16565b6110f7611abb565b60095f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600a819055506040518060400160405280828152602001600554815250600b5f61115f611abb565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f820151815f0155602082015181600101559050506111b5611abb565b73ffffffffffffffffffffffffffffffffffffffff167f3fabff0a9c3ecd6814702e247fa9733e5d0aa69e3a38590f92cb18f623a2254d826040516111fa9190611e99565b60405180910390a250565b600b602052805f5260405f205f91509050805f0154908060010154905082565b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b611252611c12565b61125b5f611c99565b565b60085481565b60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60075f9054906101000a900460ff16156112fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112f5906126f5565b60405180910390fd5b60045f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f898e5ec6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611368573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061138c91906121a5565b6113cb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113c29061221a565b60405180910390fd5b5f60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016114269190611fe1565b602060405180830381865afa158015611441573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611465919061224c565b90505f81116114a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114a09061275d565b60405180910390fd5b6064816114b691906127a8565b600681905550600160075f6101000a81548160ff0219169083151502179055507f6ee8ca63e56cfab00b9a57a3407be693c35a295e1cccea586bc90e92ff60aefe6006546040516115079190611e99565b60405180910390a150565b60095f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60065481565b6201518081565b60055481565b60045f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016115ca9190611fe1565b602060405180830381865afa1580156115e5573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611609919061224c565b905090565b600a5481565b60075f9054906101000a900460ff1681565b61162e611c12565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361169e575f6040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081526004016116959190611fe1565b60405180910390fd5b6116a781611c99565b50565b6116b2611b44565b600760019054906101000a900460ff16611701576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116f890612597565b60405180910390fd5b600854421015611746576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161173d90612822565b60405180910390fd5b600760029054906101000a900460ff1615611796576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161178d9061288a565b60405180910390fd5b6001600760026101000a81548160ff0219169083151502179055505f600760016101000a81548160ff0219169083151502179055505f73ffffffffffffffffffffffffffffffffffffffff1660095f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611a195760035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166342966c68600a546040518263ffffffff1660e01b815260040161187b9190611e99565b5f604051808303815f87803b158015611892575f80fd5b505af11580156118a4573d5f803e3d5ffd5b5050505060405180604001604052805f81526020015f815250600b5f60095f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f820151815f01556020820151816001015590505061199f60095f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660065460025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611b8a9092919063ffffffff16565b60095f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167fc358e8e3f205b5e7453abd5cbac388ca4552b887b69001bc972b88610c749035600a54600654604051611a0c929190611f37565b60405180910390a2611a6a565b5f73ffffffffffffffffffffffffffffffffffffffff167fc358e8e3f205b5e7453abd5cbac388ca4552b887b69001bc972b88610c7490355f80604051611a619291906128e1565b60405180910390a25b5f60095f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505f600a81905550611ab9611c09565b565b5f33905090565b611b3e848573ffffffffffffffffffffffffffffffffffffffff166323b872dd868686604051602401611af793929190612908565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611d5a565b50505050565b600260015403611b80576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002600181905550565b611c04838473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8585604051602401611bbd92919061293d565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611d5a565b505050565b60018081905550565b611c1a611abb565b73ffffffffffffffffffffffffffffffffffffffff16611c38611288565b73ffffffffffffffffffffffffffffffffffffffff1614611c9757611c5b611abb565b6040517f118cdaa7000000000000000000000000000000000000000000000000000000008152600401611c8e9190611fe1565b60405180910390fd5b565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f8060205f8451602086015f885af180611d79576040513d5f823e3d81fd5b3d92505f519150505f8214611d92576001811415611dad565b5f8473ffffffffffffffffffffffffffffffffffffffff163b145b15611def57836040517f5274afe7000000000000000000000000000000000000000000000000000000008152600401611de69190611fe1565b60405180910390fd5b50505050565b5f80fd5b5f819050919050565b611e0b81611df9565b8114611e15575f80fd5b50565b5f81359050611e2681611e02565b92915050565b5f60208284031215611e4157611e40611df5565b5b5f611e4e84828501611e18565b91505092915050565b5f8115159050919050565b611e6b81611e57565b82525050565b5f602082019050611e845f830184611e62565b92915050565b611e9381611df9565b82525050565b5f602082019050611eac5f830184611e8a565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f611edb82611eb2565b9050919050565b611eeb81611ed1565b8114611ef5575f80fd5b50565b5f81359050611f0681611ee2565b92915050565b5f60208284031215611f2157611f20611df5565b5b5f611f2e84828501611ef8565b91505092915050565b5f604082019050611f4a5f830185611e8a565b611f576020830184611e8a565b9392505050565b5f819050919050565b5f611f81611f7c611f7784611eb2565b611f5e565b611eb2565b9050919050565b5f611f9282611f67565b9050919050565b5f611fa382611f88565b9050919050565b611fb381611f99565b82525050565b5f602082019050611fcc5f830184611faa565b92915050565b611fdb81611ed1565b82525050565b5f602082019050611ff45f830184611fd2565b92915050565b5f61200482611f88565b9050919050565b61201481611ffa565b82525050565b5f60208201905061202d5f83018461200b565b92915050565b5f82825260208201905092915050565b7f57697468647261772070726576696f75732062696420666972737400000000005f82015250565b5f612077601b83612033565b915061208282612043565b602082019050919050565b5f6020820190508181035f8301526120a48161206b565b9050919050565b7f41756374696f6e207175616e74697479206e6f742073657400000000000000005f82015250565b5f6120df601883612033565b91506120ea826120ab565b602082019050919050565b5f6020820190508181035f83015261210c816120d3565b9050919050565b7f41756374696f6e20616c726561647920737461727465640000000000000000005f82015250565b5f612147601783612033565b915061215282612113565b602082019050919050565b5f6020820190508181035f8301526121748161213b565b9050919050565b61218481611e57565b811461218e575f80fd5b50565b5f8151905061219f8161217b565b92915050565b5f602082840312156121ba576121b9611df5565b5b5f6121c784828501612191565b91505092915050565b7f4f7065726174696f6e73207068617365206e6f7420656e6465640000000000005f82015250565b5f612204601a83612033565b915061220f826121d0565b602082019050919050565b5f6020820190508181035f830152612231816121f8565b9050919050565b5f8151905061224681611e02565b92915050565b5f6020828403121561226157612260611df5565b5b5f61226e84828501612238565b91505092915050565b7f496e73756666696369656e74204943424d20746f6b656e7300000000000000005f82015250565b5f6122ab601883612033565b91506122b682612277565b602082019050919050565b5f6020820190508181035f8301526122d88161229f565b9050919050565b7f426964206d7573742062652067726561746572207468616e20300000000000005f82015250565b5f612313601a83612033565b915061231e826122df565b602082019050919050565b5f6020820190508181035f83015261234081612307565b9050919050565b5f60408201905061235a5f830185611fd2565b6123676020830184611fd2565b9392505050565b7f496e73756666696369656e74205761726865616420616c6c6f77616e636500005f82015250565b5f6123a2601e83612033565b91506123ad8261236e565b602082019050919050565b5f6020820190508181035f8301526123cf81612396565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61240d82611df9565b915061241883611df9565b92508282019050808211156124305761242f6123d6565b5b92915050565b5f61244082611df9565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612472576124716123d6565b5b600182019050919050565b7f48696768657374206269646465722063616e6e6f7420776974686472617700005f82015250565b5f6124b1601e83612033565b91506124bc8261247d565b602082019050919050565b5f6020820190508181035f8301526124de816124a5565b9050919050565b7f4e6f2062696420746f20776974686472617700000000000000000000000000005f82015250565b5f612519601283612033565b9150612524826124e5565b602082019050919050565b5f6020820190508181035f8301526125468161250d565b9050919050565b7f41756374696f6e206e6f742073746172746564000000000000000000000000005f82015250565b5f612581601383612033565b915061258c8261254d565b602082019050919050565b5f6020820190508181035f8301526125ae81612575565b9050919050565b7f41756374696f6e20656e646564000000000000000000000000000000000000005f82015250565b5f6125e9600d83612033565b91506125f4826125b5565b602082019050919050565b5f6020820190508181035f830152612616816125dd565b9050919050565b7f426964206e6f7420686967686572207468616e2063757272656e7420686967685f8201527f6573740000000000000000000000000000000000000000000000000000000000602082015250565b5f612677602383612033565b91506126828261261d565b604082019050919050565b5f6020820190508181035f8301526126a48161266b565b9050919050565b7f5175616e7469747920616c7265616479207365740000000000000000000000005f82015250565b5f6126df601483612033565b91506126ea826126ab565b602082019050919050565b5f6020820190508181035f83015261270c816126d3565b9050919050565b7f4e6f204943424d20746f6b656e7320696e20706f6f6c000000000000000000005f82015250565b5f612747601683612033565b915061275282612713565b602082019050919050565b5f6020820190508181035f8301526127748161273b565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f6127b282611df9565b91506127bd83611df9565b9250826127cd576127cc61277b565b5b828204905092915050565b7f41756374696f6e206e6f7420656e6465640000000000000000000000000000005f82015250565b5f61280c601183612033565b9150612817826127d8565b602082019050919050565b5f6020820190508181035f83015261283981612800565b9050919050565b7f41756374696f6e20616c726561647920656e64656400000000000000000000005f82015250565b5f612874601583612033565b915061287f82612840565b602082019050919050565b5f6020820190508181035f8301526128a181612868565b9050919050565b5f819050919050565b5f6128cb6128c66128c1846128a8565b611f5e565b611df9565b9050919050565b6128db816128b1565b82525050565b5f6040820190506128f45f8301856128d2565b61290160208301846128d2565b9392505050565b5f60608201905061291b5f830186611fd2565b6129286020830185611fd2565b6129356040830184611e8a565b949350505050565b5f6040820190506129505f830185611fd2565b61295d6020830184611e8a565b939250505056fea26469706673582212200b4988a3d623ea19dee36289e9ce50b065a3f6d5cadd2ae6e2652fd8e56ff5ed64736f6c63430008140033000000000000000000000000915b4145e169ce7352936e88546ac8667d22723c

Deployed ByteCode

0x608060405234801561000f575f80fd5b506004361061020e575f3560e01c80637f81801f11610123578063c2729ea0116100ab578063f097db261161007a578063f097db261461058f578063f1631496146105ad578063f2fde38b146105cb578063f898e5ec146105e7578063f9f26041146106055761020e565b8063c2729ea014610517578063d2cc659e14610535578063dfd3ae3e14610553578063e4b7fb73146105715761020e565b80639ed1aa59116100f25780639ed1aa5914610471578063b55cd04b146104a1578063bbc914c1146104bf578063bc8fbbf8146104ef578063bfc12c05146104f95761020e565b80637f81801f146103f957806383d36e88146104175780638da5cb5b146104355780639d7b8e68146104535761020e565b80633174bdae116101a657806354cf274b1161017557806354cf274b1461037757806369347d65146103955780636df86445146103b3578063715018a6146103d15780637b76ac91146103db5761020e565b80633174bdae146103135780633e6968b614610331578063457100741461034f5780634b2e8fe0146103595761020e565b806320c69c89116101e257806320c69c891461028a57806324677320146102a657806326a4702c146102c4578063300c5579146102e25761020e565b8062d76cea1461021257806312b7bbf8146102305780631c0ff5581461024e5780631e9268a31461026c575b5f80fd5b61021a610623565b60405161022791906118da565b60405180910390f35b610238610691565b60405161024591906118da565b60405180910390f35b6102566106a1565b60405161026391906118da565b60405180910390f35b6102746106a7565b6040516102819190611932565b60405180910390f35b6102a4600480360381019061029f9190611979565b6106cf565b005b6102ae610961565b6040516102bb91906118da565b60405180910390f35b6102cc610967565b6040516102d99190611932565b60405180910390f35b6102fc60048036038101906102f791906119ce565b61098c565b60405161030a929190611a0c565b60405180910390f35b61031b6109c6565b60405161032891906118da565b60405180910390f35b6103396109cd565b60405161034691906118da565b60405180910390f35b6103576109d6565b005b610361610e9e565b60405161036e91906118da565b60405180910390f35b61037f610ea4565b60405161038c91906118da565b60405180910390f35b61039d610eab565b6040516103aa9190611a8e565b60405180910390f35b6103bb610ed0565b6040516103c891906118da565b60405180910390f35b6103d9610ede565b005b6103e3610ef1565b6040516103f091906118da565b60405180910390f35b610401610ef7565b60405161040e9190611932565b60405180910390f35b61041f610f1f565b60405161042c9190611ac7565b60405180910390f35b61043d610f44565b60405161044a9190611932565b60405180910390f35b61045b610f6b565b60405161046891906118da565b60405180910390f35b61048b60048036038101906104869190611ae0565b610f74565b60405161049891906118da565b60405180910390f35b6104a9611014565b6040516104b691906118da565b60405180910390f35b6104d960048036038101906104d49190611ae0565b61101d565b6040516104e691906118da565b60405180910390f35b6104f76110e7565b005b61050161154d565b60405161050e91906118da565b60405180910390f35b61051f611553565b60405161052c9190611932565b60405180910390f35b61053d61157b565b60405161054a91906118da565b60405180910390f35b61055b611581565b60405161056891906118da565b60405180910390f35b610579611587565b60405161058691906118da565b60405180910390f35b610597611590565b6040516105a491906118da565b60405180910390f35b6105b5611597565b6040516105c291906118da565b60405180910390f35b6105e560048036038101906105e09190611ae0565b61159e565b005b6105ef611622565b6040516105fc9190611b25565b60405180910390f35b61060d61164a565b60405161061a91906118da565b60405180910390f35b5f6006546007546106349190611b6b565b6008546a02e5276153cd3fb380000061064d9190611b9e565b11610658575f61068c565b6006546007546106689190611b6b565b6008546a02e5276153cd3fb38000006106819190611b9e565b61068b9190611bdf565b5b905090565b6b019d971e4fe8401e7400000081565b60055481565b5f60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60636008541115610715576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161070c90611c6c565b60405180910390fd5b5f8111610757576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161074e90611cd4565b60405180910390fd5b5f604051806040016040528083815260200162015180426107789190611b6b565b8152509050600b5f610788611659565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081908060018154018082558091505060019003905f5260205f2090600202015f909190919091505f820151815f01556020820151816001015550508160055f82825461080d9190611b6b565b9250508190555060015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd610859611659565b30856040518463ffffffff1660e01b815260040161087993929190611cf2565b6020604051808303815f875af1158015610895573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108b99190611d51565b6108f8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108ef90611dc6565b60405180910390fd5b610900611659565b73ffffffffffffffffffffffffffffffffffffffff167f4a25d50dd87794a1d2729a07ceafc76781eee174bc22e8788ebab11c7f55668c8362015180426109479190611b6b565b604051610955929190611a0c565b60405180910390a25050565b60065481565b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600b602052815f5260405f2081815481106109a5575f80fd5b905f5260205f2090600202015f9150915050805f0154908060010154905082565b6201518081565b5f600854905090565b6202a3006009546109e79190611b6b565b421015610a29576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a2090611e2e565b60405180910390fd5b6202a30062852780600954610a3e9190611b6b565b610a489190611b6b565b4210610a89576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a8090611e96565b60405180910390fd5b600a54421015610ace576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ac590611efe565b60405180910390fd5b60646008541115610b14576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b0b90611f66565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff1660035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610ba3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b9a90611fce565b60405180910390fd5b5f600654600754610bb49190611b6b565b6008546a02e5276153cd3fb3800000610bcd9190611b9e565b11610bd8575f610c0c565b600654600754610be89190611b6b565b6008546a02e5276153cd3fb3800000610c019190611b9e565b610c0b9190611bdf565b5b90505f81118015610c1f57506004548111155b15610e6f578060045f828254610c359190611bdf565b925050819055508060075f828254610c4d9190611b6b565b92505081905550610cc160035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff168260015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166116609092919063ffffffff16565b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167fae2935f93ee0e85030e93ff4394b2da3a7d462a70ff9132a97ddef7cc7dd5ce182604051610d2891906118da565b60405180910390a25f60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d9b573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610dbf9190612000565b90505f620186a082610dd19190612058565b90505f811115610e6c5760025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f19610e20611659565b836040518363ffffffff1660e01b8152600401610e3e929190612088565b5f604051808303815f87803b158015610e55575f80fd5b505af1158015610e67573d5f803e3d5ffd5b505050505b50505b60085f815480929190610e81906120af565b91905055506201518042610e959190611b6b565b600a8190555050565b60045481565b6201518081565b60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b69d3c21bcecceda100000081565b610ee66116df565b610eef5f611766565b565b60085481565b5f60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f600754905090565b5f80600b5f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2090505f805f90505b828054905081101561100957828181548110610fda57610fd96120f6565b5b905f5260205f2090600202015f015482610ff49190611b6b565b91508080611001906120af565b915050610fbb565b508092505050919050565b5f600654905090565b5f80600b5f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2090505f805f90505b82805490508110156110dc57828181548110611083576110826120f6565b5b905f5260205f2090600202016001015442106110c9578281815481106110ac576110ab6120f6565b5b905f5260205f2090600202015f0154826110c69190611b6b565b91505b80806110d4906120af565b915050611064565b508092505050919050565b5f600b5f6110f3611659565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2090505f805f5b838054905081101561130c57838181548110611151576111506120f6565b5b905f5260205f2090600202016001015442106112f8575f84828154811061117b5761117a6120f6565b5b905f5260205f2090600202015f015490505f600a8261119a9190612058565b905081856111a89190611b6b565b945080846111b69190611b6b565b93508060045f8282546111c99190611bdf565b925050819055508060065f8282546111e19190611b6b565b925050819055508160055f8282546111f99190611bdf565b92505081905550611208611659565b73ffffffffffffffffffffffffffffffffffffffff167f53e4c84cbbd880ccd53f5f64e9eb4882e8062c9b8198f8d829c235fa228c088683838460405161125193929190612123565b60405180910390a2856001878054905061126b9190611bdf565b8154811061127c5761127b6120f6565b5b905f5260205f20906002020186848154811061129b5761129a6120f6565b5b905f5260205f2090600202015f820154815f015560018201548160010155905050858054806112cd576112cc612158565b5b600190038181905f5260205f2090600202015f8082015f9055600182015f9055505090555050611307565b8080611303906120af565b9150505b611132565b505f821161134f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611346906121cf565b60405180910390fd5b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb611394611659565b846040518363ffffffff1660e01b81526004016113b2929190612088565b6020604051808303815f875af11580156113ce573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906113f29190611d51565b611431576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161142890611dc6565b60405180910390fd5b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166342966c68826040518263ffffffff1660e01b815260040161148b91906118da565b5f604051808303815f87803b1580156114a2575f80fd5b505af11580156114b4573d5f803e3d5ffd5b5050505060025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f196114fd611659565b836040518363ffffffff1660e01b815260040161151b929190612088565b5f604051808303815f87803b158015611532575f80fd5b505af1158015611544573d5f803e3d5ffd5b50505050505050565b60095481565b5f60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60075481565b600a5481565b5f600454905090565b6285278081565b6202a30081565b6115a66116df565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611616575f6040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260040161160d9190611932565b60405180910390fd5b61161f81611766565b50565b5f6202a300628527806009546116389190611b6b565b6116429190611b6b565b421015905090565b6a02e5276153cd3fb380000081565b5f33905090565b6116da838473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8585604051602401611693929190612088565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611827565b505050565b6116e7611659565b73ffffffffffffffffffffffffffffffffffffffff16611705610f44565b73ffffffffffffffffffffffffffffffffffffffff161461176457611728611659565b6040517f118cdaa700000000000000000000000000000000000000000000000000000000815260040161175b9190611932565b60405180910390fd5b565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f8060205f8451602086015f885af180611846576040513d5f823e3d81fd5b3d92505f519150505f821461185f57600181141561187a565b5f8473ffffffffffffffffffffffffffffffffffffffff163b145b156118bc57836040517f5274afe70000000000000000000000000000000000000000000000000000000081526004016118b39190611932565b60405180910390fd5b50505050565b5f819050919050565b6118d4816118c2565b82525050565b5f6020820190506118ed5f8301846118cb565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61191c826118f3565b9050919050565b61192c81611912565b82525050565b5f6020820190506119455f830184611923565b92915050565b5f80fd5b611958816118c2565b8114611962575f80fd5b50565b5f813590506119738161194f565b92915050565b5f6020828403121561198e5761198d61194b565b5b5f61199b84828501611965565b91505092915050565b6119ad81611912565b81146119b7575f80fd5b50565b5f813590506119c8816119a4565b92915050565b5f80604083850312156119e4576119e361194b565b5b5f6119f1858286016119ba565b9250506020611a0285828601611965565b9150509250929050565b5f604082019050611a1f5f8301856118cb565b611a2c60208301846118cb565b9392505050565b5f819050919050565b5f611a56611a51611a4c846118f3565b611a33565b6118f3565b9050919050565b5f611a6782611a3c565b9050919050565b5f611a7882611a5d565b9050919050565b611a8881611a6e565b82525050565b5f602082019050611aa15f830184611a7f565b92915050565b5f611ab182611a5d565b9050919050565b611ac181611aa7565b82525050565b5f602082019050611ada5f830184611ab8565b92915050565b5f60208284031215611af557611af461194b565b5b5f611b02848285016119ba565b91505092915050565b5f8115159050919050565b611b1f81611b0b565b82525050565b5f602082019050611b385f830184611b16565b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f611b75826118c2565b9150611b80836118c2565b9250828201905080821115611b9857611b97611b3e565b5b92915050565b5f611ba8826118c2565b9150611bb3836118c2565b9250828202611bc1816118c2565b91508282048414831517611bd857611bd7611b3e565b5b5092915050565b5f611be9826118c2565b9150611bf4836118c2565b9250828203905081811115611c0c57611c0b611b3e565b5b92915050565b5f82825260208201905092915050565b7f41726d207068617365206f7665720000000000000000000000000000000000005f82015250565b5f611c56600e83611c12565b9150611c6182611c22565b602082019050919050565b5f6020820190508181035f830152611c8381611c4a565b9050919050565b7f416d6f756e74206d7573742062652067726561746572207468616e20300000005f82015250565b5f611cbe601d83611c12565b9150611cc982611c8a565b602082019050919050565b5f6020820190508181035f830152611ceb81611cb2565b9050919050565b5f606082019050611d055f830186611923565b611d126020830185611923565b611d1f60408301846118cb565b949350505050565b611d3081611b0b565b8114611d3a575f80fd5b50565b5f81519050611d4b81611d27565b92915050565b5f60208284031215611d6657611d6561194b565b5b5f611d7384828501611d3d565b91505092915050565b7f5472616e73666572206661696c656400000000000000000000000000000000005f82015250565b5f611db0600f83611c12565b9150611dbb82611d7c565b602082019050919050565b5f6020820190508181035f830152611ddd81611da4565b9050919050565b7f4f7065726174696f6e73207068617365206e6f742073746172746564000000005f82015250565b5f611e18601c83611c12565b9150611e2382611de4565b602082019050919050565b5f6020820190508181035f830152611e4581611e0c565b9050919050565b7f4f7065726174696f6e73207068617365206f76657200000000000000000000005f82015250565b5f611e80601583611c12565b9150611e8b82611e4c565b602082019050919050565b5f6020820190508181035f830152611ead81611e74565b9050919050565b7f43616e206e6f742073656c6c20796574000000000000000000000000000000005f82015250565b5f611ee8601083611c12565b9150611ef382611eb4565b602082019050919050565b5f6020820190508181035f830152611f1581611edc565b9050919050565b7f53656c6c20706572696f6420656e6465640000000000000000000000000000005f82015250565b5f611f50601183611c12565b9150611f5b82611f1c565b602082019050919050565b5f6020820190508181035f830152611f7d81611f44565b9050919050565b7f576561706f6e734d61726b6574206e6f742073657400000000000000000000005f82015250565b5f611fb8601583611c12565b9150611fc382611f84565b602082019050919050565b5f6020820190508181035f830152611fe581611fac565b9050919050565b5f81519050611ffa8161194f565b92915050565b5f602082840312156120155761201461194b565b5b5f61202284828501611fec565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f612062826118c2565b915061206d836118c2565b92508261207d5761207c61202b565b5b828204905092915050565b5f60408201905061209b5f830185611923565b6120a860208301846118cb565b9392505050565b5f6120b9826118c2565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036120eb576120ea611b3e565b5b600182019050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f6060820190506121365f8301866118cb565b61214360208301856118cb565b61215060408301846118cb565b949350505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603160045260245ffd5b7f4e6f2062617463686573207265616479000000000000000000000000000000005f82015250565b5f6121b9601083611c12565b91506121c482612185565b602082019050919050565b5f6020820190508181035f8301526121e6816121ad565b905091905056fea2646970667358221220f5ac58839542b452caa1893b8385cc217c01a91d62252b30c820dd38208061ed64736f6c63430008140033