Cryo Explorer Ethereum Mainnet

Address Contract Verified

Address 0x7DdB2d76b80B0AA19bDEa48EB1301182F4CeefbC
Balance 0 ETH
Nonce 1
Code Size 2888 bytes
Indexed Transactions 6 (24,426,60524,426,657)
Gas Used (indexed) 286,109
External Etherscan · Sourcify

Contract Bytecode

2888 bytes
0x6080604052600436106100b55760003560e01c80639870d7fe11610069578063b80886ac1161004e578063b80886ac14610218578063e30c397814610238578063f2fde38b1461026c57600080fd5b80639870d7fe146101d8578063ac8a584a146101f857600080fd5b8063710bf3221161009a578063710bf3221461014c57806379ba50971461016e5780638da5cb5b1461018357600080fd5b806313e7c9d8146100c15780636d70f7ae1461010657600080fd5b366100bc57005b600080fd5b3480156100cd57600080fd5b506100f16100dc3660046109eb565b60006020819052908152604090205460ff1681565b60405190151581526020015b60405180910390f35b34801561011257600080fd5b506100f16101213660046109eb565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205460ff1690565b34801561015857600080fd5b5061016c6101673660046109eb565b61028c565b005b34801561017a57600080fd5b5061016c6103b4565b34801561018f57600080fd5b507f02016836a56b71f0d02689e69e326f4f4c1b9057164ef592671cf0d37c8040c0545b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100fd565b3480156101e457600080fd5b5061016c6101f33660046109eb565b61043b565b34801561020457600080fd5b5061016c6102133660046109eb565b6105d5565b61022b610226366004610a0d565b61076b565b6040516100fd9190610a96565b34801561024457600080fd5b507f9855384122b55936fbfb8ca5120e63c6537a1ac40caf6ae33502b3c5da8c87d1546101b3565b34801561027857600080fd5b5061016c6102873660046109eb565b610876565b336102b57f02016836a56b71f0d02689e69e326f4f4c1b9057164ef592671cf0d37c8040c05490565b73ffffffffffffffffffffffffffffffffffffffff1614610302576040517f30cd747100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff811661034f576040517fd924e5f400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60405173ffffffffffffffffffffffffffffffffffffffff8216907fd9be0e8e07417e00f2521db636cb53e316fd288f5051f16d2aa2bf0c3938a87690600090a27f9855384122b55936fbfb8ca5120e63c6537a1ac40caf6ae33502b3c5da8c87d155565b60006103de7f9855384122b55936fbfb8ca5120e63c6537a1ac40caf6ae33502b3c5da8c87d15490565b905073ffffffffffffffffffffffffffffffffffffffff8116331461042f576040517f49e27cff00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610438816108ec565b50565b336104647f02016836a56b71f0d02689e69e326f4f4c1b9057164ef592671cf0d37c8040c05490565b73ffffffffffffffffffffffffffffffffffffffff16146104b1576040517f30cd747100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81166104fe576040517fccea9e6f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff811660009081526020819052604090205460ff161561055e576040517f56272c9400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff811660008181526020819052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055517fac6fa858e9350a46cec16539926e0fde25b7629f84b5a72bffaae4df888ae86d9190a250565b336105fe7f02016836a56b71f0d02689e69e326f4f4c1b9057164ef592671cf0d37c8040c05490565b73ffffffffffffffffffffffffffffffffffffffff161461064b576040517f30cd747100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8116610698576040517fccea9e6f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff811660009081526020819052604090205460ff166106f7576040517fd857ba2b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff811660008181526020819052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055517f80c0b871b97b595b16a7741c1b06fed0c6f6f558639f18ccbce50724325dc40d9190a250565b3360009081526020819052604090205460609060ff166107b7576040517f7c214f0400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b816000036107c3573491505b6000808673ffffffffffffffffffffffffffffffffffffffff168487876040516107ee929190610b02565b60006040518083038185875af1925050503d806000811461082b576040519150601f19603f3d011682016040523d82523d6000602084013e610830565b606091505b50915091508161086c576040517facfdb44400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9695505050505050565b3361089f7f02016836a56b71f0d02689e69e326f4f4c1b9057164ef592671cf0d37c8040c05490565b73ffffffffffffffffffffffffffffffffffffffff161461042f576040517f30cd747100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8116610939576040517fd924e5f400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60405173ffffffffffffffffffffffffffffffffffffffff8216907f04dba622d284ed0014ee4b9a6a68386be1a4c08a4913ae272de89199cc68616390600090a27f02016836a56b71f0d02689e69e326f4f4c1b9057164ef592671cf0d37c8040c05560007f9855384122b55936fbfb8ca5120e63c6537a1ac40caf6ae33502b3c5da8c87d155565b803573ffffffffffffffffffffffffffffffffffffffff811681146109e657600080fd5b919050565b6000602082840312156109fd57600080fd5b610a06826109c2565b9392505050565b60008060008060608587031215610a2357600080fd5b610a2c856109c2565b9350602085013567ffffffffffffffff80821115610a4957600080fd5b818701915087601f830112610a5d57600080fd5b813581811115610a6c57600080fd5b886020828501011115610a7e57600080fd5b95986020929092019750949560400135945092505050565b600060208083528351808285015260005b81811015610ac357858101830151858201604001528201610aa7565b5060006040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b818382376000910190815291905056fea2646970667358221220e26dd4711320eb50e6ba86624e9c9a8ccc851394e19eb180d7096be0b157ecce64736f6c63430008130033

Verified Source Code Full Match

Compiler: v0.8.19+commit.7dd6d404 EVM: london Optimization: Yes (1000000 runs)
Ownable.sol 113 lines
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { IOwnable } from '../interfaces/IOwnable.sol';

/**
 * @title Ownable
 * @notice A 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 owner account is set through ownership transfer. This module makes
 * it possible to transfer the ownership of the contract to a new account in one
 * step, as well as to an interim pending owner. In the second flow the ownership does not
 * change until the pending owner accepts the ownership transfer.
 */
abstract contract Ownable is IOwnable {
    // keccak256('owner')
    bytes32 internal constant _OWNER_SLOT = 0x02016836a56b71f0d02689e69e326f4f4c1b9057164ef592671cf0d37c8040c0;
    // keccak256('ownership-transfer')
    bytes32 internal constant _OWNERSHIP_TRANSFER_SLOT =
        0x9855384122b55936fbfb8ca5120e63c6537a1ac40caf6ae33502b3c5da8c87d1;

    /**
     * @notice Initializes the contract by transferring ownership to the owner parameter.
     * @param _owner Address to set as the initial owner of the contract
     */
    constructor(address _owner) {
        _transferOwnership(_owner);
    }

    /**
     * @notice Modifier that throws an error if called by any account other than the owner.
     */
    modifier onlyOwner() {
        if (owner() != msg.sender) revert NotOwner();

        _;
    }

    /**
     * @notice Returns the current owner of the contract.
     * @return owner_ The current owner of the contract
     */
    function owner() public view returns (address owner_) {
        assembly {
            owner_ := sload(_OWNER_SLOT)
        }
    }

    /**
     * @notice Returns the pending owner of the contract.
     * @return owner_ The pending owner of the contract
     */
    function pendingOwner() public view returns (address owner_) {
        assembly {
            owner_ := sload(_OWNERSHIP_TRANSFER_SLOT)
        }
    }

    /**
     * @notice Transfers ownership of the contract to a new account `newOwner`.
     * @dev Can only be called by the current owner.
     * @param newOwner The address to transfer ownership to
     */
    function transferOwnership(address newOwner) external virtual onlyOwner {
        _transferOwnership(newOwner);
    }

    /**
     * @notice Propose to transfer ownership of the contract to a new account `newOwner`.
     * @dev Can only be called by the current owner. The ownership does not change
     * until the new owner accepts the ownership transfer.
     * @param newOwner The address to transfer ownership to
     */
    function proposeOwnership(address newOwner) external virtual onlyOwner {
        if (newOwner == address(0)) revert InvalidOwnerAddress();

        emit OwnershipTransferStarted(newOwner);

        assembly {
            sstore(_OWNERSHIP_TRANSFER_SLOT, newOwner)
        }
    }

    /**
     * @notice Accepts ownership of the contract.
     * @dev Can only be called by the pending owner
     */
    function acceptOwnership() external virtual {
        address newOwner = pendingOwner();
        if (newOwner != msg.sender) revert InvalidOwner();

        _transferOwnership(newOwner);
    }

    /**
     * @notice Internal function to transfer ownership of the contract to a new account `newOwner`.
     * @dev Called in the constructor to set the initial owner.
     * @param newOwner The address to transfer ownership to
     */
    function _transferOwnership(address newOwner) internal virtual {
        if (newOwner == address(0)) revert InvalidOwnerAddress();

        emit OwnershipTransferred(newOwner);

        assembly {
            sstore(_OWNER_SLOT, newOwner)
            sstore(_OWNERSHIP_TRANSFER_SLOT, 0)
        }
    }
}
Operators.sol 97 lines
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { IOperators } from '../interfaces/IOperators.sol';
import { Ownable } from './Ownable.sol';

/**
 * @title Operators
 * @notice This contract provides an access control mechanism, where an owner can register
 * operator accounts that can call arbitrary contracts on behalf of this contract.
 * @dev The owner account is initially set as the deployer address.
 */
contract Operators is Ownable, IOperators {
    mapping(address => bool) public operators;

    /**
     * @notice Sets the initial owner of the contract.
     */
    constructor(address initialOwner) Ownable(initialOwner) {}

    /**
     * @notice Modifier that requires the `msg.sender` to be an operator.
     * @dev Reverts with a NotOperator error if the condition is not met.
     */
    modifier onlyOperator() {
        if (!operators[msg.sender]) revert NotOperator();
        _;
    }

    /**
     * @notice Returns whether an address is an operator.
     * @param account Address to check
     * @return boolean whether the address is an operator
     */
    function isOperator(address account) external view returns (bool) {
        return operators[account];
    }

    /**
     * @notice Adds an address as an operator.
     * @dev Can only be called by the current owner.
     * @param operator address to be added as operator
     */
    function addOperator(address operator) external onlyOwner {
        if (operator == address(0)) revert InvalidOperator();
        if (operators[operator]) revert OperatorAlreadyAdded();

        operators[operator] = true;

        emit OperatorAdded(operator);
    }

    /**
     * @notice Removes an address as an operator.
     * @dev Can only be called by the current owner.
     * @param operator address to be removed as operator
     */
    function removeOperator(address operator) external onlyOwner {
        if (operator == address(0)) revert InvalidOperator();
        if (!operators[operator]) revert NotAnOperator();

        operators[operator] = false;

        emit OperatorRemoved(operator);
    }

    /**
     * @notice Allows an operator to execute arbitrary functions on any smart contract.
     * @dev Can only be called by an operator.
     * @param target address of the contract to execute the function on. Existence is not checked.
     * @param callData ABI encoded function call to execute on target
     * @param nativeValue The amount of native asset to send with the call. If `nativeValue` is set to `0`, then `msg.value` is forwarded instead.
     * @return data return data from executed function call
     */
    function executeContract(
        address target,
        bytes calldata callData,
        uint256 nativeValue
    ) external payable onlyOperator returns (bytes memory) {
        if (nativeValue == 0) {
            nativeValue = msg.value;
        }

        (bool success, bytes memory data) = target.call{ value: nativeValue }(callData);
        if (!success) {
            revert ExecutionFailed();
        }

        return data;
    }

    /**
     * @notice This function enables the contract to accept native value transfers.
     */
    receive() external payable {}
}
IOwnable.sol 50 lines
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @title IOwnable Interface
 * @notice IOwnable is an interface that abstracts the implementation of a
 * contract with ownership control features. It's commonly used in upgradable
 * contracts and includes the functionality to get current owner, transfer
 * ownership, and propose and accept ownership.
 */
interface IOwnable {
    error NotOwner();
    error InvalidOwner();
    error InvalidOwnerAddress();

    event OwnershipTransferStarted(address indexed newOwner);
    event OwnershipTransferred(address indexed newOwner);

    /**
     * @notice Returns the current owner of the contract.
     * @return address The address of the current owner
     */
    function owner() external view returns (address);

    /**
     * @notice Returns the address of the pending owner of the contract.
     * @return address The address of the pending owner
     */
    function pendingOwner() external view returns (address);

    /**
     * @notice Transfers ownership of the contract to a new address
     * @param newOwner The address to transfer ownership to
     */
    function transferOwnership(address newOwner) external;

    /**
     * @notice Proposes to transfer the contract's ownership to a new address.
     * The new owner needs to accept the ownership explicitly.
     * @param newOwner The address to transfer ownership to
     */
    function proposeOwnership(address newOwner) external;

    /**
     * @notice Transfers ownership to the pending owner.
     * @dev Can only be called by the pending owner
     */
    function acceptOwnership() external;
}
IOperators.sol 55 lines
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { IOwnable } from './IOwnable.sol';
import { IContractExecutor } from './IContractExecutor.sol';

/**
 * @title IOperators Interface
 * @notice Interface for an access control mechanism where operators have exclusive
 * permissions to execute functions.
 */
interface IOperators is IOwnable, IContractExecutor {
    error NotOperator();
    error InvalidOperator();
    error OperatorAlreadyAdded();
    error NotAnOperator();
    error ExecutionFailed();

    event OperatorAdded(address indexed operator);
    event OperatorRemoved(address indexed operator);

    /**
     * @notice Check if an account is an operator.
     * @param account Address of the account to check
     * @return bool True if the account is an operator, false otherwise
     */
    function isOperator(address account) external view returns (bool);

    /**
     * @notice Adds an operator.
     * @param operator The address to add as an operator
     */
    function addOperator(address operator) external;

    /**
     * @notice Removes an operator.
     * @param operator The address of the operator to remove
     */
    function removeOperator(address operator) external;

    /**
     * @notice Executes an external contract call.
     * @dev Execution logic is left up to the implementation.
     * @param target The contract to call
     * @param callData The data to call the target contract with
     * @param nativeValue The amount of native asset to send with the call
     * @return bytes The data returned from the contract call
     */
    function executeContract(
        address target,
        bytes calldata callData,
        uint256 nativeValue
    ) external payable returns (bytes memory);
}
IContractExecutor.sol 23 lines
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @title IContractExecutor Interface
 * @notice This interface defines the execute function used to interact with external contracts.
 */
interface IContractExecutor {
    /**
     * @notice Executes a call to an external contract.
     * @dev Execution logic is left up to the implementation.
     * @param target The address of the contract to be called
     * @param callData The calldata to be sent
     * @param nativeValue The amount of native token (e.g., Ether) to be sent along with the call
     * @return bytes The data returned from the executed call
     */
    function executeContract(
        address target,
        bytes calldata callData,
        uint256 nativeValue
    ) external payable returns (bytes memory);
}

Read Contract

isOperator 0x6d70f7ae → bool
operators 0x13e7c9d8 → bool
owner 0x8da5cb5b → address
pendingOwner 0xe30c3978 → address

Write Contract 6 functions

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

acceptOwnership 0x79ba5097
No parameters
addOperator 0x9870d7fe
address operator
executeContract 0xb80886ac
address target
bytes callData
uint256 nativeValue
returns: bytes
proposeOwnership 0x710bf322
address newOwner
removeOperator 0xac8a584a
address operator
transferOwnership 0xf2fde38b
address newOwner

Top Interactions

AddressTxnsSentReceived
0x15036ABA...B51F 3 3
0xF7d9e3e0...BAb0 3 3

Recent Transactions

CSV
|
Hash Method Block Age From/To Value Txn Fee Type
0xff4101fb...dfd0c7 0xb80886ac 24,426,657 IN 0x15036ABA...B51F 0 ETH EIP-1559
0xfa95563b...9c7360 0xb80886ac 24,426,653 IN 0xF7d9e3e0...BAb0 0 ETH EIP-1559
0x2440635a...66e7ea 0xb80886ac 24,426,625 IN 0x15036ABA...B51F 0 ETH EIP-1559
0xe1a96b35...2f329d 0xb80886ac 24,426,625 IN 0xF7d9e3e0...BAb0 0 ETH EIP-1559
0x9aa711f3...9c77bf 0xb80886ac 24,426,621 IN 0x15036ABA...B51F 0 ETH EIP-1559
0xcf4d268d...d7bd86 0xb80886ac 24,426,605 IN 0xF7d9e3e0...BAb0 0 ETH EIP-1559