Cryo Explorer Ethereum Mainnet

Address Contract Verified

Address 0x23E0B465633FF5178808F4A75186E2F2F9537021
Balance 0 ETH
Nonce 1
Code Size 1261 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

1261 bytes
0x608060405260043610610041575f3560e01c8063715018a6146100845780638da5cb5b1461009a578063b61d27f6146100c4578063f2fde38b146100d7575f80fd5b3661008057604080513381523460208201527fbfe611b001dfcd411432f7bf0d79b82b4b2ee81511edac123a3403c357fb972a910160405180910390a1005b5f80fd5b34801561008f575f80fd5b506100986100f6565b005b3480156100a5575f80fd5b505f54604080516001600160a01b039092168252519081900360200190f35b6100986100d236600461039b565b610109565b3480156100e2575f80fd5b506100986100f136600461041e565b6101a3565b6100fe6101e5565b6101075f610211565b565b6101116101e5565b5f6101538584848080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250899250610260915050565b9050846001600160a01b03167fe39b605d485d947e52b62c3b5028a14d5277db44425263c74171a85707154334858585856040516101949493929190610437565b60405180910390a25050505050565b6101ab6101e5565b6001600160a01b0381166101d957604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b6101e281610211565b50565b5f546001600160a01b031633146101075760405163118cdaa760e01b81523360048201526024016101d0565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6060814710156102855760405163cd78605960e01b81523060048201526024016101d0565b5f80856001600160a01b031684866040516102a091906104a1565b5f6040518083038185875af1925050503d805f81146102da576040519150601f19603f3d011682016040523d82523d5f602084013e6102df565b606091505b50915091506102ef8683836102fb565b925050505b9392505050565b6060826103105761030b82610357565b6102f4565b815115801561032757506001600160a01b0384163b155b1561035057604051639996b31560e01b81526001600160a01b03851660048201526024016101d0565b50806102f4565b8051156103675780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b80356001600160a01b0381168114610396575f80fd5b919050565b5f805f80606085870312156103ae575f80fd5b6103b785610380565b935060208501359250604085013567ffffffffffffffff8111156103d9575f80fd5b8501601f810187136103e9575f80fd5b803567ffffffffffffffff8111156103ff575f80fd5b876020828401011115610410575f80fd5b949793965060200194505050565b5f6020828403121561042e575f80fd5b6102f482610380565b84815260606020820152826060820152828460808301375f608084830101525f601f19601f850116820160808382030160408401528351806080830152806020860160a084015e5f60a0838301810191909152601f909101601f1916909101019695505050505050565b5f82518060208501845e5f92019182525091905056fea2646970667358221220407494e113de1af53620ac5863090a7d36377e0dc0c0e3ceb6ab73b78f492e6a64736f6c634300081a0033

Verified Source Code Full Match

Compiler: v0.8.26+commit.8a97fa7a EVM: cancun Optimization: Yes (200 runs)
Executor.sol 45 lines
// SPDX-FileCopyrightText: 2024 Lido <[email protected]>
// SPDX-License-Identifier: MIT
pragma solidity 0.8.26;

import {Address} from "@openzeppelin/contracts/utils/Address.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";

import {IExternalExecutor} from "./interfaces/IExternalExecutor.sol";

/// @title Executor
/// @notice Allows the contract owner to execute external function calls on specified target contracts with
///     possible value transfers.
contract Executor is IExternalExecutor, Ownable {
    // ---
    // Events
    // ---

    event ETHReceived(address sender, uint256 value);
    event Executed(address indexed target, uint256 ethValue, bytes data, bytes returndata);

    // ---
    // Constructor
    // ---

    constructor(address owner) Ownable(owner) {}

    // ---
    // Main Functionality
    // ---

    /// @notice Allows the contract owner to execute external function calls on target contracts, optionally transferring ether.
    /// @param target The address of the target contract on which to execute the function call.
    /// @param value The amount of ether (in wei) to send with the function call.
    /// @param payload The calldata for the function call.
    function execute(address target, uint256 value, bytes calldata payload) external payable {
        _checkOwner();
        bytes memory returndata = Address.functionCallWithValue(target, payload, value);
        emit Executed(target, value, payload, returndata);
    }

    /// @notice Allows the contract to receive ether.
    receive() external payable {
        emit ETHReceived(msg.sender, msg.value);
    }
}
Address.sol 159 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol)

pragma solidity ^0.8.20;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev The ETH balance of the account is not enough to perform the operation.
     */
    error AddressInsufficientBalance(address account);

    /**
     * @dev There's no code at `target` (it is not a contract).
     */
    error AddressEmptyCode(address target);

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

    /**
     * @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 AddressInsufficientBalance(address(this));
        }

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

    /**
     * @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
     * {FailedInnerCall} 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 AddressInsufficientBalance(address(this));
        }
        (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 {FailedInnerCall}) 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 {FailedInnerCall} 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 {FailedInnerCall}.
     */
    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
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert FailedInnerCall();
        }
    }
}
Ownable.sol 100 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.20;

import {Context} from "../utils/Context.sol";

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

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

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

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

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

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

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}
IExternalExecutor.sol 7 lines
// SPDX-FileCopyrightText: 2024 Lido <[email protected]>
// SPDX-License-Identifier: MIT
pragma solidity 0.8.26;

interface IExternalExecutor {
    function execute(address target, uint256 value, bytes calldata payload) external payable;
}
Context.sol 28 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;

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

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

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

Read Contract

owner 0x8da5cb5b → address

Write Contract 3 functions

These functions modify contract state and require a wallet transaction to execute.

execute 0xb61d27f6
address target
uint256 value
bytes payload
renounceOwnership 0x715018a6
No parameters
transferOwnership 0xf2fde38b
address newOwner

Recent Transactions

No transactions found for this address