HYPE Price: $23.77 (+7.37%)
 

Overview

HYPE Balance

HyperEVM LogoHyperEVM LogoHyperEVM Logo0 HYPE

HYPE Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To
Withdraw To Nati...252462812026-01-22 12:51:004 days ago1769086260IN
0xfeF3E355...fddC62e58
0 HYPE0.00000980.1
Withdraw To Nati...250713812026-01-20 13:03:446 days ago1768914224IN
0xfeF3E355...fddC62e58
0 HYPE0.00000980.1
Withdraw To Nati...247102342026-01-16 10:21:5510 days ago1768558915IN
0xfeF3E355...fddC62e58
0 HYPE0.000012620.12877006
Withdraw To Nati...244456302026-01-13 10:04:0813 days ago1768298648IN
0xfeF3E355...fddC62e58
0 HYPE0.000013090.1137
Withdraw To Nati...242738352026-01-11 11:07:5015 days ago1768129670IN
0xfeF3E355...fddC62e58
0 HYPE0.000011140.1137
Withdraw To Nati...242736962026-01-11 11:05:3315 days ago1768129533IN
0xfeF3E355...fddC62e58
0 HYPE0.000011140.1137
Withdraw To Nati...240506002026-01-08 22:08:1417 days ago1767910094IN
0xfeF3E355...fddC62e58
0 HYPE0.000019610.2
Withdraw To Nati...234361722026-01-01 22:14:1824 days ago1767305658IN
0xfeF3E355...fddC62e58
0 HYPE0.00000980.1
Withdraw To Nati...233172712025-12-31 13:45:0626 days ago1767188706IN
0xfeF3E355...fddC62e58
0 HYPE0.000011110.11329
Withdraw To Nati...231705632025-12-29 21:40:0327 days ago1767044403IN
0xfeF3E355...fddC62e58
0 HYPE0.000011150.1137
Withdraw To Nati...229106022025-12-26 22:38:2330 days ago1766788703IN
0xfeF3E355...fddC62e58
0 HYPE0.00000980.1
Withdraw To Nati...227982242025-12-25 15:56:0732 days ago1766678167IN
0xfeF3E355...fddC62e58
0 HYPE0.000011590.11825
Withdraw To Nati...222871992025-12-19 20:17:1437 days ago1766175434IN
0xfeF3E355...fddC62e58
0 HYPE0.000080650.82251835
Withdraw To Nati...220634382025-12-17 7:09:0140 days ago1765955341IN
0xfeF3E355...fddC62e58
0 HYPE0.00000990.101
Withdraw To Nati...216544102025-12-12 15:23:3945 days ago1765553019IN
0xfeF3E355...fddC62e58
0 HYPE0.000042920.37268907
Withdraw To Nati...216444032025-12-12 12:39:3645 days ago1765543176IN
0xfeF3E355...fddC62e58
0 HYPE0.000013930.14217
Withdraw To Nati...216443572025-12-12 12:38:5145 days ago1765543131IN
0xfeF3E355...fddC62e58
0 HYPE0.00001990.203
Withdraw To Nati...214129242025-12-09 21:24:5247 days ago1765315492IN
0xfeF3E355...fddC62e58
0 HYPE0.000016890.17230394
Withdraw To Nati...213684332025-12-09 9:15:3048 days ago1765271730IN
0xfeF3E355...fddC62e58
0 HYPE0.000009960.101647
Withdraw To Nati...213122512025-12-08 17:54:2949 days ago1765216469IN
0xfeF3E355...fddC62e58
0 HYPE0.000009980.10189374
Withdraw To Nati...213122122025-12-08 17:53:5149 days ago1765216431IN
0xfeF3E355...fddC62e58
0 HYPE0.000017560.17920138
Withdraw To Nati...212456782025-12-07 23:43:0749 days ago1765150987IN
0xfeF3E355...fddC62e58
0 HYPE0.000012740.13
Withdraw To Nati...210065442025-12-05 6:21:3152 days ago1764915691IN
0xfeF3E355...fddC62e58
0 HYPE0.000011760.12
Withdraw To Nati...206230122025-11-30 21:34:0656 days ago1764538446IN
0xfeF3E355...fddC62e58
0 HYPE0.000024870.2536
Withdraw To Nati...204919202025-11-29 9:45:0358 days ago1764409503IN
0xfeF3E355...fddC62e58
0 HYPE0.000011560.11797
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
252462812026-01-22 12:51:004 days ago1769086260
0xfeF3E355...fddC62e58
0.0077242 HYPE
252462812026-01-22 12:51:004 days ago1769086260
0xfeF3E355...fddC62e58
0.0077242 HYPE
250713812026-01-20 13:03:446 days ago1768914224
0xfeF3E355...fddC62e58
0.02398598 HYPE
250713812026-01-20 13:03:446 days ago1768914224
0xfeF3E355...fddC62e58
0.02398598 HYPE
247102342026-01-16 10:21:5510 days ago1768558915
0xfeF3E355...fddC62e58
0.01566386 HYPE
247102342026-01-16 10:21:5510 days ago1768558915
0xfeF3E355...fddC62e58
0.01566386 HYPE
244456302026-01-13 10:04:0813 days ago1768298648
0xfeF3E355...fddC62e58
0.02639004 HYPE
244456302026-01-13 10:04:0813 days ago1768298648
0xfeF3E355...fddC62e58
0.02639004 HYPE
242738352026-01-11 11:07:5015 days ago1768129670
0xfeF3E355...fddC62e58
0.08578379 HYPE
242738352026-01-11 11:07:5015 days ago1768129670
0xfeF3E355...fddC62e58
0.08578379 HYPE
242736962026-01-11 11:05:3315 days ago1768129533
0xfeF3E355...fddC62e58
0.19431973 HYPE
242736962026-01-11 11:05:3315 days ago1768129533
0xfeF3E355...fddC62e58
0.19431973 HYPE
240506002026-01-08 22:08:1417 days ago1767910094
0xfeF3E355...fddC62e58
0.04778657 HYPE
240506002026-01-08 22:08:1417 days ago1767910094
0xfeF3E355...fddC62e58
0.04778657 HYPE
234361722026-01-01 22:14:1824 days ago1767305658
0xfeF3E355...fddC62e58
0.00556921 HYPE
234361722026-01-01 22:14:1824 days ago1767305658
0xfeF3E355...fddC62e58
0.00556921 HYPE
233172712025-12-31 13:45:0626 days ago1767188706
0xfeF3E355...fddC62e58
0.00687785 HYPE
233172712025-12-31 13:45:0626 days ago1767188706
0xfeF3E355...fddC62e58
0.00687785 HYPE
231705632025-12-29 21:40:0327 days ago1767044403
0xfeF3E355...fddC62e58
0.01424027 HYPE
231705632025-12-29 21:40:0327 days ago1767044403
0xfeF3E355...fddC62e58
0.01424027 HYPE
229106022025-12-26 22:38:2330 days ago1766788703
0xfeF3E355...fddC62e58
0.00528393 HYPE
229106022025-12-26 22:38:2330 days ago1766788703
0xfeF3E355...fddC62e58
0.00528393 HYPE
227982242025-12-25 15:56:0732 days ago1766678167
0xfeF3E355...fddC62e58
0.05785122 HYPE
227982242025-12-25 15:56:0732 days ago1766678167
0xfeF3E355...fddC62e58
0.05785122 HYPE
222871992025-12-19 20:17:1437 days ago1766175434
0xfeF3E355...fddC62e58
0.01598404 HYPE
View All Internal Transactions
Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
TestHype

Compiler Version
v0.8.30+commit.73712a01

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 1 : .sol
// SPDX-License-Identifier: MIT
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);
}

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

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




/**
 * @dev Collection of common custom errors used in multiple contracts
 *
 * IMPORTANT: Backwards compatibility is not guaranteed in future versions of the library.
 * It is recommended to avoid relying on the error API for critical functionality.
 *
 * _Available since v5.1._
 */
library Errors {
    /**
     * @dev The ETH balance of the account is not enough to perform the operation.
     */
    error InsufficientBalance(uint256 balance, uint256 needed);

    /**
     * @dev A call to an address target failed. The target may have reverted.
     */
    error FailedCall();

    /**
     * @dev The deployment failed.
     */
    error FailedDeployment();

    /**
     * @dev A necessary precompile is missing.
     */
    error MissingPrecompile(address);
}

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev There's no code at `target` (it is not a contract).
     */
    error AddressEmptyCode(address target);

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

        (bool success, ) = recipient.call{value: amount}("");
        if (!success) {
            revert Errors.FailedCall();
        }
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason or custom error, it is bubbled
     * up by this function (like regular Solidity function calls). However, if
     * the call reverted with no returned reason, this function reverts with a
     * {Errors.FailedCall} error.
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        if (address(this).balance < value) {
            revert Errors.InsufficientBalance(address(this).balance, value);
        }
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
     * was not a contract or bubbling up the revert reason (falling back to {Errors.FailedCall}) in case
     * of an unsuccessful call.
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata
    ) internal view returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            // only check if target is a contract if the call was successful and the return data is empty
            // otherwise we already know that it was a contract
            if (returndata.length == 0 && target.code.length == 0) {
                revert AddressEmptyCode(target);
            }
            return returndata;
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
     * revert reason or with a default {Errors.FailedCall} error.
     */
    function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            return returndata;
        }
    }

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

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





/**
 * @dev Library of standard hash functions.
 *
 * _Available since v5.1._
 */
library Hashes {
    /**
     * @dev Commutative Keccak256 hash of a sorted pair of bytes32. Frequently used when working with merkle proofs.
     *
     * NOTE: Equivalent to the `standardNodeHash` in our https://github.com/OpenZeppelin/merkle-tree[JavaScript library].
     */
    function commutativeKeccak256(bytes32 a, bytes32 b) internal pure returns (bytes32) {
        return a < b ? _efficientKeccak256(a, b) : _efficientKeccak256(b, a);
    }

    /**
     * @dev Implementation of keccak256(abi.encode(a, b)) that doesn't allocate or expand memory.
     */
    function _efficientKeccak256(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
        assembly ("memory-safe") {
            mstore(0x00, a)
            mstore(0x20, b)
            value := keccak256(0x00, 0x40)
        }
    }
}

/**
 * @dev These functions deal with verification of Merkle Tree proofs.
 *
 * The tree and the proofs can be generated using our
 * https://github.com/OpenZeppelin/merkle-tree[JavaScript library].
 * You will find a quickstart guide in the readme.
 *
 * WARNING: You should avoid using leaf values that are 64 bytes long prior to
 * hashing, or use a hash function other than keccak256 for hashing leaves.
 * This is because the concatenation of a sorted pair of internal nodes in
 * the Merkle tree could be reinterpreted as a leaf value.
 * OpenZeppelin's JavaScript library generates Merkle trees that are safe
 * against this attack out of the box.
 *
 * IMPORTANT: Consider memory side-effects when using custom hashing functions
 * that access memory in an unsafe way.
 *
 * NOTE: This library supports proof verification for merkle trees built using
 * custom _commutative_ hashing functions (i.e. `H(a, b) == H(b, a)`). Proving
 * leaf inclusion in trees built using non-commutative hashing functions requires
 * additional logic that is not supported by this library.
 */
library MerkleProof {
    /**
     *@dev The multiproof provided is not valid.
     */
    error MerkleProofInvalidMultiproof();

    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     *
     * This version handles proofs in memory with the default hashing function.
     */
    function verify(bytes32[] memory proof, bytes32 root, bytes32 leaf) internal pure returns (bool) {
        return processProof(proof, leaf) == root;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
     * hash matches the root of the tree. When processing the proof, the pairs
     * of leaves & pre-images are assumed to be sorted.
     *
     * This version handles proofs in memory with the default hashing function.
     */
    function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = Hashes.commutativeKeccak256(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     *
     * This version handles proofs in memory with a custom hashing function.
     */
    function verify(
        bytes32[] memory proof,
        bytes32 root,
        bytes32 leaf,
        function(bytes32, bytes32) view returns (bytes32) hasher
    ) internal view returns (bool) {
        return processProof(proof, leaf, hasher) == root;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
     * hash matches the root of the tree. When processing the proof, the pairs
     * of leaves & pre-images are assumed to be sorted.
     *
     * This version handles proofs in memory with a custom hashing function.
     */
    function processProof(
        bytes32[] memory proof,
        bytes32 leaf,
        function(bytes32, bytes32) view returns (bytes32) hasher
    ) internal view returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = hasher(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     *
     * This version handles proofs in calldata with the default hashing function.
     */
    function verifyCalldata(bytes32[] calldata proof, bytes32 root, bytes32 leaf) internal pure returns (bool) {
        return processProofCalldata(proof, leaf) == root;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
     * hash matches the root of the tree. When processing the proof, the pairs
     * of leaves & pre-images are assumed to be sorted.
     *
     * This version handles proofs in calldata with the default hashing function.
     */
    function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = Hashes.commutativeKeccak256(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     *
     * This version handles proofs in calldata with a custom hashing function.
     */
    function verifyCalldata(
        bytes32[] calldata proof,
        bytes32 root,
        bytes32 leaf,
        function(bytes32, bytes32) view returns (bytes32) hasher
    ) internal view returns (bool) {
        return processProofCalldata(proof, leaf, hasher) == root;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
     * hash matches the root of the tree. When processing the proof, the pairs
     * of leaves & pre-images are assumed to be sorted.
     *
     * This version handles proofs in calldata with a custom hashing function.
     */
    function processProofCalldata(
        bytes32[] calldata proof,
        bytes32 leaf,
        function(bytes32, bytes32) view returns (bytes32) hasher
    ) internal view returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = hasher(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a Merkle tree defined by
     * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
     *
     * This version handles multiproofs in memory with the default hashing function.
     *
     * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details.
     *
     * NOTE: Consider the case where `root == proof[0] && leaves.length == 0` as it will return `true`.
     * The `leaves` must be validated independently. See {processMultiProof}.
     */
    function multiProofVerify(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProof(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction
     * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another
     * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false
     * respectively.
     *
     * This version handles multiproofs in memory with the default hashing function.
     *
     * CAUTION: Not all Merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree
     * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the
     * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer).
     *
     * NOTE: The _empty set_ (i.e. the case where `proof.length == 1 && leaves.length == 0`) is considered a no-op,
     * and therefore a valid multiproof (i.e. it returns `proof[0]`). Consider disallowing this case if you're not
     * validating the leaves elsewhere.
     */
    function processMultiProof(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the Merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 proofFlagsLen = proofFlags.length;

        // Check proof validity.
        if (leavesLen + proof.length != proofFlagsLen + 1) {
            revert MerkleProofInvalidMultiproof();
        }

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](proofFlagsLen);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < proofFlagsLen; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i]
                ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++])
                : proof[proofPos++];
            hashes[i] = Hashes.commutativeKeccak256(a, b);
        }

        if (proofFlagsLen > 0) {
            if (proofPos != proof.length) {
                revert MerkleProofInvalidMultiproof();
            }
            unchecked {
                return hashes[proofFlagsLen - 1];
            }
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    /**
     * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a Merkle tree defined by
     * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
     *
     * This version handles multiproofs in memory with a custom hashing function.
     *
     * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details.
     *
     * NOTE: Consider the case where `root == proof[0] && leaves.length == 0` as it will return `true`.
     * The `leaves` must be validated independently. See {processMultiProof}.
     */
    function multiProofVerify(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32 root,
        bytes32[] memory leaves,
        function(bytes32, bytes32) view returns (bytes32) hasher
    ) internal view returns (bool) {
        return processMultiProof(proof, proofFlags, leaves, hasher) == root;
    }

    /**
     * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction
     * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another
     * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false
     * respectively.
     *
     * This version handles multiproofs in memory with a custom hashing function.
     *
     * CAUTION: Not all Merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree
     * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the
     * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer).
     *
     * NOTE: The _empty set_ (i.e. the case where `proof.length == 1 && leaves.length == 0`) is considered a no-op,
     * and therefore a valid multiproof (i.e. it returns `proof[0]`). Consider disallowing this case if you're not
     * validating the leaves elsewhere.
     */
    function processMultiProof(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32[] memory leaves,
        function(bytes32, bytes32) view returns (bytes32) hasher
    ) internal view returns (bytes32 merkleRoot) {
        // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the Merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 proofFlagsLen = proofFlags.length;

        // Check proof validity.
        if (leavesLen + proof.length != proofFlagsLen + 1) {
            revert MerkleProofInvalidMultiproof();
        }

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](proofFlagsLen);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < proofFlagsLen; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i]
                ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++])
                : proof[proofPos++];
            hashes[i] = hasher(a, b);
        }

        if (proofFlagsLen > 0) {
            if (proofPos != proof.length) {
                revert MerkleProofInvalidMultiproof();
            }
            unchecked {
                return hashes[proofFlagsLen - 1];
            }
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    /**
     * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a Merkle tree defined by
     * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
     *
     * This version handles multiproofs in calldata with the default hashing function.
     *
     * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details.
     *
     * NOTE: Consider the case where `root == proof[0] && leaves.length == 0` as it will return `true`.
     * The `leaves` must be validated independently. See {processMultiProofCalldata}.
     */
    function multiProofVerifyCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProofCalldata(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction
     * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another
     * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false
     * respectively.
     *
     * This version handles multiproofs in calldata with the default hashing function.
     *
     * CAUTION: Not all Merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree
     * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the
     * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer).
     *
     * NOTE: The _empty set_ (i.e. the case where `proof.length == 1 && leaves.length == 0`) is considered a no-op,
     * and therefore a valid multiproof (i.e. it returns `proof[0]`). Consider disallowing this case if you're not
     * validating the leaves elsewhere.
     */
    function processMultiProofCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the Merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 proofFlagsLen = proofFlags.length;

        // Check proof validity.
        if (leavesLen + proof.length != proofFlagsLen + 1) {
            revert MerkleProofInvalidMultiproof();
        }

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](proofFlagsLen);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < proofFlagsLen; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i]
                ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++])
                : proof[proofPos++];
            hashes[i] = Hashes.commutativeKeccak256(a, b);
        }

        if (proofFlagsLen > 0) {
            if (proofPos != proof.length) {
                revert MerkleProofInvalidMultiproof();
            }
            unchecked {
                return hashes[proofFlagsLen - 1];
            }
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    /**
     * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a Merkle tree defined by
     * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
     *
     * This version handles multiproofs in calldata with a custom hashing function.
     *
     * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details.
     *
     * NOTE: Consider the case where `root == proof[0] && leaves.length == 0` as it will return `true`.
     * The `leaves` must be validated independently. See {processMultiProofCalldata}.
     */
    function multiProofVerifyCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32 root,
        bytes32[] memory leaves,
        function(bytes32, bytes32) view returns (bytes32) hasher
    ) internal view returns (bool) {
        return processMultiProofCalldata(proof, proofFlags, leaves, hasher) == root;
    }

    /**
     * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction
     * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another
     * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false
     * respectively.
     *
     * This version handles multiproofs in calldata with a custom hashing function.
     *
     * CAUTION: Not all Merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree
     * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the
     * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer).
     *
     * NOTE: The _empty set_ (i.e. the case where `proof.length == 1 && leaves.length == 0`) is considered a no-op,
     * and therefore a valid multiproof (i.e. it returns `proof[0]`). Consider disallowing this case if you're not
     * validating the leaves elsewhere.
     */
    function processMultiProofCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32[] memory leaves,
        function(bytes32, bytes32) view returns (bytes32) hasher
    ) internal view returns (bytes32 merkleRoot) {
        // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the Merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 proofFlagsLen = proofFlags.length;

        // Check proof validity.
        if (leavesLen + proof.length != proofFlagsLen + 1) {
            revert MerkleProofInvalidMultiproof();
        }

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](proofFlagsLen);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < proofFlagsLen; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i]
                ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++])
                : proof[proofPos++];
            hashes[i] = hasher(a, b);
        }

        if (proofFlagsLen > 0) {
            if (proofPos != proof.length) {
                revert MerkleProofInvalidMultiproof();
            }
            unchecked {
                return hashes[proofFlagsLen - 1];
            }
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }
}

interface IWHype is IERC20 {
    function deposit() external payable;
    function withdraw(uint256 amount) external;
}

contract TestHype {
    using SafeERC20 for IERC20;
    using SafeERC20 for IWHype;

    uint256 public POINTS_TO_GENERATE_1MINER = 864000;
    uint256 PSN = 10000;
    uint256 PSNH = 5000;
    bool public initialized = false;

    IWHype public WHYPE; 
    bytes32 public merkleRoot;

    address public treasuryAddress;
    address public secondaryTreasuryAddress; // Nouvelle adresse pour 10% des fees
    address public owner;

    mapping(address => uint256) public hypeMiners;
    mapping(address => uint256) public claimedPoints;
    mapping(address => uint256) public lastInk;
    mapping(address => uint256) public lastWithdraw;
    mapping(address => address) public referrals;

    uint256 constant INK_STEP = 1 days;
    uint256 constant INK_STEP_MODIFIER = 0.1e18;
    uint256 constant BASE_PERCENTAGE = 0.5e18;

    uint256 public marketPoints;

    modifier onlyOwner() {
        require(msg.sender == owner, "Not owner");
        _;
    }

    constructor(
        address _treasuryAddress, 
        address _secondaryTreasuryAddress, // Nouveau paramètre
        bytes32 _merkleRoot, 
        address _whypeAddress
    ) {
        require(_treasuryAddress != address(0), "Treasury address cannot be zero");
        require(_secondaryTreasuryAddress != address(0), "Secondary treasury address cannot be zero");
        require(_whypeAddress != address(0), "WHYPE address cannot be zero");
        
        owner = msg.sender;
        WHYPE = IWHype(_whypeAddress);
        treasuryAddress = _treasuryAddress;
        secondaryTreasuryAddress = _secondaryTreasuryAddress;
        merkleRoot = _merkleRoot;
    }

    function depositNativeHype(address ref) external payable {
        require(initialized, "Not initialized");
        require(msg.value > 0, "Invalid amount");

        WHYPE.deposit{value: msg.value}();
        
        _deposit(msg.value, ref, false);
    }

    function depositNativeHypeWithProof(
        address ref,
        bytes32[] memory proof
    ) external payable {
        require(initialized, "Not initialized");
        require(msg.value > 0, "Invalid amount");

        bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
        require(MerkleProof.verify(proof, merkleRoot, leaf), "Invalid proof");

        WHYPE.deposit{value: msg.value}();
        
        _deposit(msg.value, ref, true); 
    }

    function depositWHype(uint amount, address ref) external {
        require(initialized, "Not initialized");
        require(amount > 0, "Invalid amount");

        WHYPE.safeTransferFrom(msg.sender, address(this), amount);
        _deposit(amount, ref, false);
    }

    function depositWHypeWithProof(
        uint amount,
        address ref,
        bytes32[] memory proof
    ) external {
        require(initialized, "Not initialized");
        require(amount > 0, "Invalid amount");

        bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
        require(MerkleProof.verify(proof, merkleRoot, leaf), "Invalid proof");

        WHYPE.safeTransferFrom(msg.sender, address(this), amount);
        _deposit(amount, ref, true);
    }

    function withdrawToNativeHype() external {
        require(initialized, "Not initialized");
        uint256 hasPoints = getMyPoints();

        require(hasPoints > 0, "No points to withdraw");
        uint256 pointValue = calculatePointSell(hasPoints);
        uint256 fee = devFee(pointValue);

        claimedPoints[msg.sender] = 0;
        lastInk[msg.sender] = block.timestamp;
        lastWithdraw[msg.sender] = block.timestamp;

        marketPoints += hasPoints;

        // Distribution des fees: 10% vers secondaryTreasury, 90% vers treasury principal
        _distributeFees(fee);

        uint256 userAmount = pointValue - fee;
        WHYPE.withdraw(userAmount);
        
        (bool success, ) = payable(msg.sender).call{value: userAmount}("");
        require(success, "Transfer failed");
    }

    function withdrawToWHype() external {
        require(initialized, "Not initialized");
        uint256 hasPoints = getMyPoints();

        require(hasPoints > 0, "No points to withdraw");
        uint256 pointValue = calculatePointSell(hasPoints);
        uint256 fee = devFee(pointValue);

        claimedPoints[msg.sender] = 0;
        lastInk[msg.sender] = block.timestamp;
        lastWithdraw[msg.sender] = block.timestamp;

        marketPoints += hasPoints;

        // Distribution des fees: 10% vers secondaryTreasury, 90% vers treasury principal
        _distributeFees(fee);

        WHYPE.safeTransfer(msg.sender, pointValue - fee);
    }

    function compound(address ref) public {
        require(initialized, "Not initialized");
        if (ref == msg.sender) {
            ref = address(0);
        }
        if (
            referrals[msg.sender] == address(0) &&
            referrals[msg.sender] != msg.sender
        ) {
            referrals[msg.sender] = ref;
        }
        uint256 pointsUsed = getMyPoints();

        uint256 newMiners = pointsUsed / POINTS_TO_GENERATE_1MINER;
        hypeMiners[msg.sender] += newMiners;
        claimedPoints[msg.sender] = 0;
        lastInk[msg.sender] = block.timestamp;

        claimedPoints[referrals[msg.sender]] += pointsUsed / 10;

        marketPoints += pointsUsed / 2;
    }

    function _deposit(uint amount, address ref, bool holder) internal {
        uint256 pointsBought = calculatePointBuy(amount, getBalance() - amount);

        if (holder) {
            pointsBought += (pointsBought * 2) / 100; 
        }

        pointsBought -= devFee(pointsBought);
        uint256 fee = devFee(amount);

        // Distribution des fees: 10% vers secondaryTreasury, 90% vers treasury principal
        _distributeFees(fee);

        claimedPoints[msg.sender] += pointsBought;
        compound(ref);
    }

    /**
     * @dev Distribue les frais entre les deux adresses de trésorerie
     * @param totalFee Le montant total des frais à distribuer
     */
    function _distributeFees(uint256 totalFee) internal {
        uint256 secondaryFee = (totalFee * 10) / 100; // 10% pour la trésorerie secondaire
        uint256 primaryFee = totalFee - secondaryFee;  // 90% pour la trésorerie principale

        WHYPE.safeTransfer(secondaryTreasuryAddress, secondaryFee);
        WHYPE.safeTransfer(treasuryAddress, primaryFee);
    }

    function calculateTrade(
        uint256 rt,
        uint256 rs,
        uint256 bs
    ) public view returns (uint256) {
        return (PSN * bs) / (PSNH + ((PSN * rs + PSNH * rt) / rt));
    }

    function calculatePointSell(uint256 points) public view returns (uint256) {
        if (points == 0) return 0;
        return calculateTrade(points, marketPoints, getBalance());
    }

    function calculatePointBuy(
        uint256 eth,
        uint256 contractBalance
    ) public view returns (uint256) {
        return calculateTrade(eth, contractBalance, marketPoints);
    }

    function calculatePointBuySimple(uint256 eth) public view returns (uint256) {
        return calculatePointBuy(eth, getBalance());
    }

    function devFee(uint256 amount) public pure returns (uint256) {
        return (amount * 5) / 100;
    }

    function seedMarket() public payable onlyOwner {
        require(marketPoints == 0, "Market already seeded");
        initialized = true;
        marketPoints = 86400000000;
    }

    function getBalance() public view returns (uint256) {
        return WHYPE.balanceOf(address(this));
    }

    function getMyMiners() public view returns (uint256) {
        return hypeMiners[msg.sender];
    }

    function getMyPoints() public view returns (uint256) {
        return claimedPoints[msg.sender] + getPointsSinceLastInk(msg.sender);
    }

    function getPointsSinceLastInk(address adr) public view returns (uint256) {
        uint256 steps = (block.timestamp - lastWithdraw[msg.sender]) /
            INK_STEP;

        uint256 percentage = min(
            1e18,
            BASE_PERCENTAGE + steps * INK_STEP_MODIFIER
        );

        uint256 secondsPassed = min(
            POINTS_TO_GENERATE_1MINER,
            block.timestamp - lastInk[adr]
        );
        return ((secondsPassed * hypeMiners[adr]) * percentage) / 1e18;
    }

    function getHalvingPercentage() public view returns (uint256) {
        uint256 steps = (block.timestamp - lastWithdraw[msg.sender]) /
            INK_STEP;

        return min(1e18, BASE_PERCENTAGE + steps * INK_STEP_MODIFIER);
    }

    function min(uint256 a, uint256 b) private pure returns (uint256) {
        return a < b ? a : b;
    }

    receive() external payable {}
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_treasuryAddress","type":"address"},{"internalType":"address","name":"_secondaryTreasuryAddress","type":"address"},{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"},{"internalType":"address","name":"_whypeAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"inputs":[],"name":"POINTS_TO_GENERATE_1MINER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WHYPE","outputs":[{"internalType":"contract IWHype","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"eth","type":"uint256"},{"internalType":"uint256","name":"contractBalance","type":"uint256"}],"name":"calculatePointBuy","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"eth","type":"uint256"}],"name":"calculatePointBuySimple","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"points","type":"uint256"}],"name":"calculatePointSell","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"rt","type":"uint256"},{"internalType":"uint256","name":"rs","type":"uint256"},{"internalType":"uint256","name":"bs","type":"uint256"}],"name":"calculateTrade","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"claimedPoints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"ref","type":"address"}],"name":"compound","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"ref","type":"address"}],"name":"depositNativeHype","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"ref","type":"address"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"depositNativeHypeWithProof","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"ref","type":"address"}],"name":"depositWHype","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"ref","type":"address"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"depositWHypeWithProof","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"devFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getHalvingPercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMyMiners","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMyPoints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"adr","type":"address"}],"name":"getPointsSinceLastInk","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"hypeMiners","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initialized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lastInk","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lastWithdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"marketPoints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"referrals","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"secondaryTreasuryAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"seedMarket","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"treasuryAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawToNativeHype","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawToWHype","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

6080604052620d2f005f556127106001556113886002556003805460ff1916905534801561002b575f5ffd5b5060405161184b38038061184b83398101604081905261004a916101dc565b6001600160a01b0384166100a55760405162461bcd60e51b815260206004820152601f60248201527f547265617375727920616464726573732063616e6e6f74206265207a65726f0060448201526064015b60405180910390fd5b6001600160a01b03831661010d5760405162461bcd60e51b815260206004820152602960248201527f5365636f6e6461727920747265617375727920616464726573732063616e6e6f60448201526874206265207a65726f60b81b606482015260840161009c565b6001600160a01b0381166101635760405162461bcd60e51b815260206004820152601c60248201527f574859504520616464726573732063616e6e6f74206265207a65726f00000000604482015260640161009c565b60078054336001600160a01b03199182161790915560038054610100600160a81b0319166101006001600160a01b03948516021790556005805482169583169590951790945560068054909416921691909117909155600455610226565b80516001600160a01b03811681146101d7575f5ffd5b919050565b5f5f5f5f608085870312156101ef575f5ffd5b6101f8856101c1565b9350610206602086016101c1565b92506040850151915061021b606086016101c1565b905092959194509250565b611618806102335f395ff3fe6080604052600436106101d3575f3560e01c806374640ee4116100fd578063ba9c463711610092578063ea6493aa11610062578063ea6493aa14610533578063ed46864114610552578063eed5f37714610566578063fbc8b21f14610585575f5ffd5b8063ba9c4637146104d9578063bd5f4a80146104ed578063c5f956af14610500578063d34bfc281461051f575f5ffd5b806394c840d2116100cd57806394c840d21461043c5780639ca423b31461045b578063a3315a3d1461048f578063afeb5c1f146104ae575f5ffd5b806374640ee4146103c05780637d389506146103df5780638b144a33146103fe5780638da5cb5b1461041d575f5ffd5b8063284dac23116101735780633c5f07cb116101435780633c5f07cb1461033c57806345d8da961461034457806359f613a414610359578063624d7b7214610395575f5ffd5b8063284dac23146102d55780632eb4a7ab146102f45780633bc0461a146103095780633bda33b114610328575f5ffd5b806312065fe0116101ae57806312065fe01461024e578063158ef93e146102625780631a99fa781461028b578063229824c4146102b6575f5ffd5b806309be893e146101de5780630a76e5ed146101f457806310dff60e14610223575f5ffd5b366101da57005b5f5ffd5b3480156101e9575f5ffd5b506101f2610598565b005b3480156101ff575f5ffd5b50335f908152600860205260409020545b6040519081526020015b60405180910390f35b34801561022e575f5ffd5b5061021061023d366004611305565b60096020525f908152604090205481565b348015610259575f5ffd5b50610210610771565b34801561026d575f5ffd5b5060035461027b9060ff1681565b604051901515815260200161021a565b348015610296575f5ffd5b506102106102a5366004611305565b600a6020525f908152604090205481565b3480156102c1575f5ffd5b506102106102d036600461131e565b6107e5565b3480156102e0575f5ffd5b506101f26102ef366004611305565b610844565b3480156102ff575f5ffd5b5061021060045481565b348015610314575f5ffd5b50610210610323366004611347565b6109ab565b348015610333575f5ffd5b506102105f5481565b6101f26109c9565b34801561034f575f5ffd5b50610210600d5481565b348015610364575f5ffd5b5060035461037d9061010090046001600160a01b031681565b6040516001600160a01b03909116815260200161021a565b3480156103a0575f5ffd5b506102106103af366004611305565b600b6020525f908152604090205481565b3480156103cb575f5ffd5b506102106103da36600461135e565b610a6f565b3480156103ea575f5ffd5b5060065461037d906001600160a01b031681565b348015610409575f5ffd5b50610210610418366004611347565b610a84565b348015610428575f5ffd5b5060075461037d906001600160a01b031681565b348015610447575f5ffd5b506101f261045636600461137e565b610a91565b348015610466575f5ffd5b5061037d610475366004611305565b600c6020525f90815260409020546001600160a01b031681565b34801561049a575f5ffd5b506102106104a9366004611347565b610afe565b3480156104b9575f5ffd5b506102106104c8366004611305565b60086020525f908152604090205481565b3480156104e4575f5ffd5b50610210610b1c565b6101f26104fb366004611458565b610b3f565b34801561050b575f5ffd5b5060055461037d906001600160a01b031681565b34801561052a575f5ffd5b50610210610c77565b34801561053e575f5ffd5b5061021061054d366004611305565b610cde565b34801561055d575f5ffd5b506101f2610da4565b348015610571575f5ffd5b506101f26105803660046114a3565b610ea2565b6101f2610593366004611305565b610f93565b60035460ff166105c35760405162461bcd60e51b81526004016105ba906114f6565b60405180910390fd5b5f6105cc610b1c565b90505f81116106155760405162461bcd60e51b81526020600482015260156024820152744e6f20706f696e747320746f20776974686472617760581b60448201526064016105ba565b5f61061f82610afe565b90505f61062b826109ab565b335f908152600960209081526040808320839055600a82528083204290819055600b909252822055600d8054929350859290919061066a908490611533565b90915550610679905081611047565b5f6106848284611546565b600354604051632e1a7d4d60e01b81526004810183905291925061010090046001600160a01b031690632e1a7d4d906024015f604051808303815f87803b1580156106cd575f5ffd5b505af11580156106df573d5f5f3e3d5ffd5b50506040515f925033915083908381818185875af1925050503d805f8114610722576040519150601f19603f3d011682016040523d82523d5f602084013e610727565b606091505b505090508061076a5760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b60448201526064016105ba565b5050505050565b6003546040516370a0823160e01b81523060048201525f9161010090046001600160a01b0316906370a0823190602401602060405180830381865afa1580156107bc573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107e09190611559565b905090565b5f83846002546107f59190611570565b846001546108039190611570565b61080d9190611533565b6108179190611587565b6002546108249190611533565b826001546108329190611570565b61083c9190611587565b949350505050565b60035460ff166108665760405162461bcd60e51b81526004016105ba906114f6565b336001600160a01b0382160361087957505f5b335f908152600c60205260409020546001600160a01b03161580156108b45750335f818152600c60205260409020546001600160a01b031614155b156108e157335f908152600c6020526040902080546001600160a01b0319166001600160a01b0383161790555b5f6108ea610b1c565b90505f5f54826108fa9190611587565b335f9081526008602052604081208054929350839290919061091d908490611533565b9091555050335f908152600960209081526040808320839055600a9182905290912042905561094c9083611587565b335f908152600c60209081526040808320546001600160a01b03168352600990915281208054909190610980908490611533565b909155506109919050600283611587565b600d5f8282546109a19190611533565b9091555050505050565b5f60646109b9836005611570565b6109c39190611587565b92915050565b6007546001600160a01b03163314610a0f5760405162461bcd60e51b81526020600482015260096024820152682737ba1037bbb732b960b91b60448201526064016105ba565b600d5415610a575760405162461bcd60e51b815260206004820152601560248201527413585c9ad95d08185b1c9958591e481cd959591959605a1b60448201526064016105ba565b6003805460ff1916600117905564141dd76000600d55565b5f610a7d8383600d546107e5565b9392505050565b5f6109c3826103da610771565b60035460ff16610ab35760405162461bcd60e51b81526004016105ba906114f6565b5f8211610ad25760405162461bcd60e51b81526004016105ba906115a6565b600354610aef9061010090046001600160a01b03163330856110b3565b610afa82825f61111a565b5050565b5f815f03610b0d57505f919050565b6109c382600d546102d0610771565b5f610b2633610cde565b335f908152600960205260409020546107e09190611533565b60035460ff16610b615760405162461bcd60e51b81526004016105ba906114f6565b5f3411610b805760405162461bcd60e51b81526004016105ba906115a6565b6040516bffffffffffffffffffffffff193360601b1660208201525f90603401604051602081830303815290604052805190602001209050610bc582600454836111b5565b610c015760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b210383937b7b360991b60448201526064016105ba565b600360019054906101000a90046001600160a01b03166001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004015f604051808303818588803b158015610c4f575f5ffd5b505af1158015610c61573d5f5f3e3d5ffd5b5050505050610c723484600161111a565b505050565b335f908152600b602052604081205481906201518090610c979042611546565b610ca19190611587565b9050610cd8670de0b6b3a7640000610cc167016345785d8a000084611570565b610cd3906706f05b59d3b20000611533565b6111ca565b91505090565b335f908152600b602052604081205481906201518090610cfe9042611546565b610d089190611587565b90505f610d29670de0b6b3a7640000610cc167016345785d8a000085611570565b5f80546001600160a01b0387168252600a60205260408220549293509091610d569190610cd39042611546565b6001600160a01b0386165f90815260086020526040902054909150670de0b6b3a7640000908390610d879084611570565b610d919190611570565b610d9b9190611587565b95945050505050565b60035460ff16610dc65760405162461bcd60e51b81526004016105ba906114f6565b5f610dcf610b1c565b90505f8111610e185760405162461bcd60e51b81526020600482015260156024820152744e6f20706f696e747320746f20776974686472617760581b60448201526064016105ba565b5f610e2282610afe565b90505f610e2e826109ab565b335f908152600960209081526040808320839055600a82528083204290819055600b909252822055600d80549293508592909190610e6d908490611533565b90915550610e7c905081611047565b610c7233610e8a8385611546565b60035461010090046001600160a01b031691906111df565b60035460ff16610ec45760405162461bcd60e51b81526004016105ba906114f6565b5f8311610ee35760405162461bcd60e51b81526004016105ba906115a6565b6040516bffffffffffffffffffffffff193360601b1660208201525f90603401604051602081830303815290604052805190602001209050610f2882600454836111b5565b610f645760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b210383937b7b360991b60448201526064016105ba565b600354610f819061010090046001600160a01b03163330876110b3565b610f8d8484600161111a565b50505050565b60035460ff16610fb55760405162461bcd60e51b81526004016105ba906114f6565b5f3411610fd45760405162461bcd60e51b81526004016105ba906115a6565b600360019054906101000a90046001600160a01b03166001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004015f604051808303818588803b158015611022575f5ffd5b505af1158015611034573d5f5f3e3d5ffd5b505050505061104434825f61111a565b50565b5f606461105583600a611570565b61105f9190611587565b90505f61106c8284611546565b6006546003549192506110919161010090046001600160a01b039081169116846111df565b600554600354610c72916001600160a01b0361010090920482169116836111df565b6040516001600160a01b038481166024830152838116604483015260648201839052610f8d9186918216906323b872dd906084015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050611210565b5f6111328485611128610771565b6103da9190611546565b9050811561115e576064611147826002611570565b6111519190611587565b61115b9082611533565b90505b611167816109ab565b6111719082611546565b90505f61117d856109ab565b905061118881611047565b335f90815260096020526040812080548492906111a6908490611533565b9091555061076a905084610844565b5f826111c1858461127c565b14949350505050565b5f8183106111d85781610a7d565b5090919050565b6040516001600160a01b03838116602483015260448201839052610c7291859182169063a9059cbb906064016110e8565b5f5f60205f8451602086015f885af18061122f576040513d5f823e3d81fd5b50505f513d91508115611246578060011415611253565b6001600160a01b0384163b155b15610f8d57604051635274afe760e01b81526001600160a01b03851660048201526024016105ba565b5f81815b84518110156112b6576112ac8286838151811061129f5761129f6115ce565b60200260200101516112be565b9150600101611280565b509392505050565b5f8183106112d8575f828152602084905260409020610a7d565b5f838152602083905260409020610a7d565b80356001600160a01b0381168114611300575f5ffd5b919050565b5f60208284031215611315575f5ffd5b610a7d826112ea565b5f5f5f60608486031215611330575f5ffd5b505081359360208301359350604090920135919050565b5f60208284031215611357575f5ffd5b5035919050565b5f5f6040838503121561136f575f5ffd5b50508035926020909101359150565b5f5f6040838503121561138f575f5ffd5b8235915061139f602084016112ea565b90509250929050565b634e487b7160e01b5f52604160045260245ffd5b5f82601f8301126113cb575f5ffd5b813567ffffffffffffffff8111156113e5576113e56113a8565b8060051b604051601f19603f830116810181811067ffffffffffffffff82111715611412576114126113a8565b60405291825260208185018101929081018684111561142f575f5ffd5b6020860192505b8383101561144e578235815260209283019201611436565b5095945050505050565b5f5f60408385031215611469575f5ffd5b611472836112ea565b9150602083013567ffffffffffffffff81111561148d575f5ffd5b611499858286016113bc565b9150509250929050565b5f5f5f606084860312156114b5575f5ffd5b833592506114c5602085016112ea565b9150604084013567ffffffffffffffff8111156114e0575f5ffd5b6114ec868287016113bc565b9150509250925092565b6020808252600f908201526e139bdd081a5b9a5d1a585b1a5e9959608a1b604082015260600190565b634e487b7160e01b5f52601160045260245ffd5b808201808211156109c3576109c361151f565b818103818111156109c3576109c361151f565b5f60208284031215611569575f5ffd5b5051919050565b80820281158282048414176109c3576109c361151f565b5f826115a157634e487b7160e01b5f52601260045260245ffd5b500490565b6020808252600e908201526d125b9d985b1a5908185b5bdd5b9d60921b604082015260600190565b634e487b7160e01b5f52603260045260245ffdfea2646970667358221220170d28e1f8b5f0b5dc9286095f7c33a3746f9fce78d955afe7d539973d84bdba64736f6c634300081e0033000000000000000000000000cbef18c1413a6141147eac9eebcab351ea536ab3000000000000000000000000e61f7dc53d6d1526c24cac27ea47364e1724a12300000000000000000000000000000000000000000000000000000000000000000000000000000000000000005555555555555555555555555555555555555555

Deployed Bytecode

0x6080604052600436106101d3575f3560e01c806374640ee4116100fd578063ba9c463711610092578063ea6493aa11610062578063ea6493aa14610533578063ed46864114610552578063eed5f37714610566578063fbc8b21f14610585575f5ffd5b8063ba9c4637146104d9578063bd5f4a80146104ed578063c5f956af14610500578063d34bfc281461051f575f5ffd5b806394c840d2116100cd57806394c840d21461043c5780639ca423b31461045b578063a3315a3d1461048f578063afeb5c1f146104ae575f5ffd5b806374640ee4146103c05780637d389506146103df5780638b144a33146103fe5780638da5cb5b1461041d575f5ffd5b8063284dac23116101735780633c5f07cb116101435780633c5f07cb1461033c57806345d8da961461034457806359f613a414610359578063624d7b7214610395575f5ffd5b8063284dac23146102d55780632eb4a7ab146102f45780633bc0461a146103095780633bda33b114610328575f5ffd5b806312065fe0116101ae57806312065fe01461024e578063158ef93e146102625780631a99fa781461028b578063229824c4146102b6575f5ffd5b806309be893e146101de5780630a76e5ed146101f457806310dff60e14610223575f5ffd5b366101da57005b5f5ffd5b3480156101e9575f5ffd5b506101f2610598565b005b3480156101ff575f5ffd5b50335f908152600860205260409020545b6040519081526020015b60405180910390f35b34801561022e575f5ffd5b5061021061023d366004611305565b60096020525f908152604090205481565b348015610259575f5ffd5b50610210610771565b34801561026d575f5ffd5b5060035461027b9060ff1681565b604051901515815260200161021a565b348015610296575f5ffd5b506102106102a5366004611305565b600a6020525f908152604090205481565b3480156102c1575f5ffd5b506102106102d036600461131e565b6107e5565b3480156102e0575f5ffd5b506101f26102ef366004611305565b610844565b3480156102ff575f5ffd5b5061021060045481565b348015610314575f5ffd5b50610210610323366004611347565b6109ab565b348015610333575f5ffd5b506102105f5481565b6101f26109c9565b34801561034f575f5ffd5b50610210600d5481565b348015610364575f5ffd5b5060035461037d9061010090046001600160a01b031681565b6040516001600160a01b03909116815260200161021a565b3480156103a0575f5ffd5b506102106103af366004611305565b600b6020525f908152604090205481565b3480156103cb575f5ffd5b506102106103da36600461135e565b610a6f565b3480156103ea575f5ffd5b5060065461037d906001600160a01b031681565b348015610409575f5ffd5b50610210610418366004611347565b610a84565b348015610428575f5ffd5b5060075461037d906001600160a01b031681565b348015610447575f5ffd5b506101f261045636600461137e565b610a91565b348015610466575f5ffd5b5061037d610475366004611305565b600c6020525f90815260409020546001600160a01b031681565b34801561049a575f5ffd5b506102106104a9366004611347565b610afe565b3480156104b9575f5ffd5b506102106104c8366004611305565b60086020525f908152604090205481565b3480156104e4575f5ffd5b50610210610b1c565b6101f26104fb366004611458565b610b3f565b34801561050b575f5ffd5b5060055461037d906001600160a01b031681565b34801561052a575f5ffd5b50610210610c77565b34801561053e575f5ffd5b5061021061054d366004611305565b610cde565b34801561055d575f5ffd5b506101f2610da4565b348015610571575f5ffd5b506101f26105803660046114a3565b610ea2565b6101f2610593366004611305565b610f93565b60035460ff166105c35760405162461bcd60e51b81526004016105ba906114f6565b60405180910390fd5b5f6105cc610b1c565b90505f81116106155760405162461bcd60e51b81526020600482015260156024820152744e6f20706f696e747320746f20776974686472617760581b60448201526064016105ba565b5f61061f82610afe565b90505f61062b826109ab565b335f908152600960209081526040808320839055600a82528083204290819055600b909252822055600d8054929350859290919061066a908490611533565b90915550610679905081611047565b5f6106848284611546565b600354604051632e1a7d4d60e01b81526004810183905291925061010090046001600160a01b031690632e1a7d4d906024015f604051808303815f87803b1580156106cd575f5ffd5b505af11580156106df573d5f5f3e3d5ffd5b50506040515f925033915083908381818185875af1925050503d805f8114610722576040519150601f19603f3d011682016040523d82523d5f602084013e610727565b606091505b505090508061076a5760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b60448201526064016105ba565b5050505050565b6003546040516370a0823160e01b81523060048201525f9161010090046001600160a01b0316906370a0823190602401602060405180830381865afa1580156107bc573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107e09190611559565b905090565b5f83846002546107f59190611570565b846001546108039190611570565b61080d9190611533565b6108179190611587565b6002546108249190611533565b826001546108329190611570565b61083c9190611587565b949350505050565b60035460ff166108665760405162461bcd60e51b81526004016105ba906114f6565b336001600160a01b0382160361087957505f5b335f908152600c60205260409020546001600160a01b03161580156108b45750335f818152600c60205260409020546001600160a01b031614155b156108e157335f908152600c6020526040902080546001600160a01b0319166001600160a01b0383161790555b5f6108ea610b1c565b90505f5f54826108fa9190611587565b335f9081526008602052604081208054929350839290919061091d908490611533565b9091555050335f908152600960209081526040808320839055600a9182905290912042905561094c9083611587565b335f908152600c60209081526040808320546001600160a01b03168352600990915281208054909190610980908490611533565b909155506109919050600283611587565b600d5f8282546109a19190611533565b9091555050505050565b5f60646109b9836005611570565b6109c39190611587565b92915050565b6007546001600160a01b03163314610a0f5760405162461bcd60e51b81526020600482015260096024820152682737ba1037bbb732b960b91b60448201526064016105ba565b600d5415610a575760405162461bcd60e51b815260206004820152601560248201527413585c9ad95d08185b1c9958591e481cd959591959605a1b60448201526064016105ba565b6003805460ff1916600117905564141dd76000600d55565b5f610a7d8383600d546107e5565b9392505050565b5f6109c3826103da610771565b60035460ff16610ab35760405162461bcd60e51b81526004016105ba906114f6565b5f8211610ad25760405162461bcd60e51b81526004016105ba906115a6565b600354610aef9061010090046001600160a01b03163330856110b3565b610afa82825f61111a565b5050565b5f815f03610b0d57505f919050565b6109c382600d546102d0610771565b5f610b2633610cde565b335f908152600960205260409020546107e09190611533565b60035460ff16610b615760405162461bcd60e51b81526004016105ba906114f6565b5f3411610b805760405162461bcd60e51b81526004016105ba906115a6565b6040516bffffffffffffffffffffffff193360601b1660208201525f90603401604051602081830303815290604052805190602001209050610bc582600454836111b5565b610c015760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b210383937b7b360991b60448201526064016105ba565b600360019054906101000a90046001600160a01b03166001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004015f604051808303818588803b158015610c4f575f5ffd5b505af1158015610c61573d5f5f3e3d5ffd5b5050505050610c723484600161111a565b505050565b335f908152600b602052604081205481906201518090610c979042611546565b610ca19190611587565b9050610cd8670de0b6b3a7640000610cc167016345785d8a000084611570565b610cd3906706f05b59d3b20000611533565b6111ca565b91505090565b335f908152600b602052604081205481906201518090610cfe9042611546565b610d089190611587565b90505f610d29670de0b6b3a7640000610cc167016345785d8a000085611570565b5f80546001600160a01b0387168252600a60205260408220549293509091610d569190610cd39042611546565b6001600160a01b0386165f90815260086020526040902054909150670de0b6b3a7640000908390610d879084611570565b610d919190611570565b610d9b9190611587565b95945050505050565b60035460ff16610dc65760405162461bcd60e51b81526004016105ba906114f6565b5f610dcf610b1c565b90505f8111610e185760405162461bcd60e51b81526020600482015260156024820152744e6f20706f696e747320746f20776974686472617760581b60448201526064016105ba565b5f610e2282610afe565b90505f610e2e826109ab565b335f908152600960209081526040808320839055600a82528083204290819055600b909252822055600d80549293508592909190610e6d908490611533565b90915550610e7c905081611047565b610c7233610e8a8385611546565b60035461010090046001600160a01b031691906111df565b60035460ff16610ec45760405162461bcd60e51b81526004016105ba906114f6565b5f8311610ee35760405162461bcd60e51b81526004016105ba906115a6565b6040516bffffffffffffffffffffffff193360601b1660208201525f90603401604051602081830303815290604052805190602001209050610f2882600454836111b5565b610f645760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b210383937b7b360991b60448201526064016105ba565b600354610f819061010090046001600160a01b03163330876110b3565b610f8d8484600161111a565b50505050565b60035460ff16610fb55760405162461bcd60e51b81526004016105ba906114f6565b5f3411610fd45760405162461bcd60e51b81526004016105ba906115a6565b600360019054906101000a90046001600160a01b03166001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004015f604051808303818588803b158015611022575f5ffd5b505af1158015611034573d5f5f3e3d5ffd5b505050505061104434825f61111a565b50565b5f606461105583600a611570565b61105f9190611587565b90505f61106c8284611546565b6006546003549192506110919161010090046001600160a01b039081169116846111df565b600554600354610c72916001600160a01b0361010090920482169116836111df565b6040516001600160a01b038481166024830152838116604483015260648201839052610f8d9186918216906323b872dd906084015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050611210565b5f6111328485611128610771565b6103da9190611546565b9050811561115e576064611147826002611570565b6111519190611587565b61115b9082611533565b90505b611167816109ab565b6111719082611546565b90505f61117d856109ab565b905061118881611047565b335f90815260096020526040812080548492906111a6908490611533565b9091555061076a905084610844565b5f826111c1858461127c565b14949350505050565b5f8183106111d85781610a7d565b5090919050565b6040516001600160a01b03838116602483015260448201839052610c7291859182169063a9059cbb906064016110e8565b5f5f60205f8451602086015f885af18061122f576040513d5f823e3d81fd5b50505f513d91508115611246578060011415611253565b6001600160a01b0384163b155b15610f8d57604051635274afe760e01b81526001600160a01b03851660048201526024016105ba565b5f81815b84518110156112b6576112ac8286838151811061129f5761129f6115ce565b60200260200101516112be565b9150600101611280565b509392505050565b5f8183106112d8575f828152602084905260409020610a7d565b5f838152602083905260409020610a7d565b80356001600160a01b0381168114611300575f5ffd5b919050565b5f60208284031215611315575f5ffd5b610a7d826112ea565b5f5f5f60608486031215611330575f5ffd5b505081359360208301359350604090920135919050565b5f60208284031215611357575f5ffd5b5035919050565b5f5f6040838503121561136f575f5ffd5b50508035926020909101359150565b5f5f6040838503121561138f575f5ffd5b8235915061139f602084016112ea565b90509250929050565b634e487b7160e01b5f52604160045260245ffd5b5f82601f8301126113cb575f5ffd5b813567ffffffffffffffff8111156113e5576113e56113a8565b8060051b604051601f19603f830116810181811067ffffffffffffffff82111715611412576114126113a8565b60405291825260208185018101929081018684111561142f575f5ffd5b6020860192505b8383101561144e578235815260209283019201611436565b5095945050505050565b5f5f60408385031215611469575f5ffd5b611472836112ea565b9150602083013567ffffffffffffffff81111561148d575f5ffd5b611499858286016113bc565b9150509250929050565b5f5f5f606084860312156114b5575f5ffd5b833592506114c5602085016112ea565b9150604084013567ffffffffffffffff8111156114e0575f5ffd5b6114ec868287016113bc565b9150509250925092565b6020808252600f908201526e139bdd081a5b9a5d1a585b1a5e9959608a1b604082015260600190565b634e487b7160e01b5f52601160045260245ffd5b808201808211156109c3576109c361151f565b818103818111156109c3576109c361151f565b5f60208284031215611569575f5ffd5b5051919050565b80820281158282048414176109c3576109c361151f565b5f826115a157634e487b7160e01b5f52601260045260245ffd5b500490565b6020808252600e908201526d125b9d985b1a5908185b5bdd5b9d60921b604082015260600190565b634e487b7160e01b5f52603260045260245ffdfea2646970667358221220170d28e1f8b5f0b5dc9286095f7c33a3746f9fce78d955afe7d539973d84bdba64736f6c634300081e0033

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

000000000000000000000000cbef18c1413a6141147eac9eebcab351ea536ab3000000000000000000000000e61f7dc53d6d1526c24cac27ea47364e1724a12300000000000000000000000000000000000000000000000000000000000000000000000000000000000000005555555555555555555555555555555555555555

-----Decoded View---------------
Arg [0] : _treasuryAddress (address): 0xCBeF18C1413a6141147Eac9EEBCaB351EA536ab3
Arg [1] : _secondaryTreasuryAddress (address): 0xe61F7DC53D6D1526C24cac27Ea47364e1724A123
Arg [2] : _merkleRoot (bytes32): 0x0000000000000000000000000000000000000000000000000000000000000000
Arg [3] : _whypeAddress (address): 0x5555555555555555555555555555555555555555

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000cbef18c1413a6141147eac9eebcab351ea536ab3
Arg [1] : 000000000000000000000000e61f7dc53d6d1526c24cac27ea47364e1724a123
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [3] : 0000000000000000000000005555555555555555555555555555555555555555


Block Transaction Gas Used Reward
view all blocks ##produced##

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.