ETH Price: $2,322.09 (+2.72%)

Contract

0x42d67472b2B00Bc91c24794075D3a268Db6119A9
 

Overview

ETH Balance

0.006031 ETH

Eth Value

$14.00 (@ $2,322.09/ETH)

Token Holdings

More Info

Private Name Tags

TokenTracker

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Set Approval For...243625072026-02-01 14:07:2343 days ago1769954843IN
0x42d67472...8Db6119A9
0 ETH0.000140312.29159505
Set Approval For...235240082025-10-07 6:12:35161 days ago1759817555IN
0x42d67472...8Db6119A9
0 ETH0.000004460.11381823
Safe Transfer Fr...231666412025-08-18 8:05:59211 days ago1755504359IN
0x42d67472...8Db6119A9
0 ETH0.000145562.29621089
Set Approval For...221903612025-04-03 19:05:59347 days ago1743707159IN
0x42d67472...8Db6119A9
0 ETH0.000042731.08907746
Set Approval For...219351802025-02-27 4:07:35383 days ago1740629255IN
0x42d67472...8Db6119A9
0 ETH0.000061141
Set Approval For...215135952024-12-30 6:47:11442 days ago1735541231IN
0x42d67472...8Db6119A9
0 ETH0.000194113.17453641
Set Approval For...215086582024-12-29 14:15:11442 days ago1735481711IN
0x42d67472...8Db6119A9
0 ETH0.000493968.07667333
Set Approval For...214379722024-12-19 17:10:47452 days ago1734628247IN
0x42d67472...8Db6119A9
0 ETH0.0012908721.11064842
Set Approval For...214128362024-12-16 4:57:11456 days ago1734325031IN
0x42d67472...8Db6119A9
0 ETH0.000524948.58485404
Set Approval For...210844952024-10-31 8:43:11502 days ago1730364191IN
0x42d67472...8Db6119A9
0 ETH0.000297837.59078338
Safe Transfer Fr...201835122024-06-27 14:06:11627 days ago1719497171IN
0x42d67472...8Db6119A9
0 ETH0.0016189413.61107199
Safe Transfer Fr...201493242024-06-22 19:27:23632 days ago1719084443IN
0x42d67472...8Db6119A9
0 ETH0.000290922.76333178
Set Approval For...198127662024-05-06 18:15:47679 days ago1715019347IN
0x42d67472...8Db6119A9
0 ETH0.000354335.79468587
Set Approval For...197171072024-04-23 9:09:23693 days ago1713863363IN
0x42d67472...8Db6119A9
0 ETH0.000497248.13183468
Set Approval For...196790872024-04-18 1:32:59698 days ago1713403979IN
0x42d67472...8Db6119A9
0 ETH0.0006259210.23619603
Set Approval For...196340022024-04-11 17:55:35704 days ago1712858135IN
0x42d67472...8Db6119A9
0 ETH0.0014195823.18368066
Safe Transfer Fr...192371002024-02-16 1:09:23760 days ago1708045763IN
0x42d67472...8Db6119A9
0 ETH0.0012854822.03142412
Safe Transfer Fr...192370952024-02-16 1:08:23760 days ago1708045703IN
0x42d67472...8Db6119A9
0 ETH0.001636920.3981202
Safe Transfer Fr...191943892024-02-10 1:18:47766 days ago1707527927IN
0x42d67472...8Db6119A9
0 ETH0.0025242730.61137063
Transfer From191345772024-02-01 15:50:11774 days ago1706802611IN
0x42d67472...8Db6119A9
0 ETH0.0033272833.35360074
__proxy__transfe...190994412024-01-27 17:35:35779 days ago1706376935IN
0x42d67472...8Db6119A9
0 ETH0.0004950917.35663693
Update Item190993452024-01-27 17:15:47779 days ago1706375747IN
0x42d67472...8Db6119A9
0 ETH0.000898114.52211613
Safe Transfer Fr...190920372024-01-26 16:42:11780 days ago1706287331IN
0x42d67472...8Db6119A9
0 ETH0.0014244122.55681342
Safe Transfer Fr...190886122024-01-26 5:11:23781 days ago1706245883IN
0x42d67472...8Db6119A9
0 ETH0.0014363817.89936686
Safe Transfer Fr...190738182024-01-24 3:27:35783 days ago1706066855IN
0x42d67472...8Db6119A9
0 ETH0.0009926312.36956033
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Method Block
From
To
Transfer197093402024-04-22 7:07:11694 days ago1713769631
0x42d67472...8Db6119A9
0.05841 ETH
Transfer197093402024-04-22 7:07:11694 days ago1713769631
0x42d67472...8Db6119A9
0.00059 ETH
Purchase197093402024-04-22 7:07:11694 days ago1713769631
0x42d67472...8Db6119A9
0.059 ETH
Transfer190920192024-01-26 16:38:35780 days ago1706287115
0x42d67472...8Db6119A9
0.0002 ETH
Transfer190725682024-01-23 23:15:59783 days ago1706051759
0x42d67472...8Db6119A9
0.05841 ETH
Transfer190725682024-01-23 23:15:59783 days ago1706051759
0x42d67472...8Db6119A9
0.00059 ETH
Purchase190725682024-01-23 23:15:59783 days ago1706051759
0x42d67472...8Db6119A9
0.059 ETH
Transfer190518762024-01-21 1:12:35786 days ago1705799555
0x42d67472...8Db6119A9
0.05841 ETH
Transfer190518762024-01-21 1:12:35786 days ago1705799555
0x42d67472...8Db6119A9
0.00059 ETH
Transfer189996492024-01-13 18:06:47793 days ago1705169207
0x42d67472...8Db6119A9
0.000836 ETH
Transfer189728462024-01-10 0:01:47797 days ago1704844907
0x42d67472...8Db6119A9
0.05841 ETH
Transfer189728462024-01-10 0:01:47797 days ago1704844907
0x42d67472...8Db6119A9
0.00059 ETH
Purchase189728462024-01-10 0:01:47797 days ago1704844907
0x42d67472...8Db6119A9
0.059 ETH
Transfer189708202024-01-09 17:13:47797 days ago1704820427
0x42d67472...8Db6119A9
0.05841 ETH
Transfer189708202024-01-09 17:13:47797 days ago1704820427
0x42d67472...8Db6119A9
0.00059 ETH
Purchase189708202024-01-09 17:13:47797 days ago1704820427
0x42d67472...8Db6119A9
0.059 ETH
Transfer189098112024-01-01 3:06:11806 days ago1704078371
0x42d67472...8Db6119A9
0.05841 ETH
Transfer189098112024-01-01 3:06:11806 days ago1704078371
0x42d67472...8Db6119A9
0.00059 ETH
Transfer189020912023-12-31 1:07:35807 days ago1703984855
0x42d67472...8Db6119A9
0.05841 ETH
Transfer189020912023-12-31 1:07:35807 days ago1703984855
0x42d67472...8Db6119A9
0.00059 ETH
Transfer188901072023-12-29 8:40:11809 days ago1703839211
0x42d67472...8Db6119A9
0.05841 ETH
Transfer188901072023-12-29 8:40:11809 days ago1703839211
0x42d67472...8Db6119A9
0.00059 ETH
Transfer188821792023-12-28 5:58:47810 days ago1703743127
0x42d67472...8Db6119A9
0.05841 ETH
Transfer188821792023-12-28 5:58:47810 days ago1703743127
0x42d67472...8Db6119A9
0.00059 ETH
Transfer188811242023-12-28 2:24:47810 days ago1703730287
0x42d67472...8Db6119A9
0.05841 ETH
View All Internal Transactions
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x359f59c1...BAC95581C
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
HybridProxy

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

// SPDX-License-Identifier: UNLICENSED
// All rights reserved
// TOKU Labs Pte Ltd 2023

pragma solidity 0.8.17;

import "@openzeppelin/contracts/interfaces/IERC1967.sol";
import "@openzeppelin/contracts/proxy/beacon/IBeacon.sol";
import "@openzeppelin/contracts/proxy/Proxy.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/StorageSlot.sol";

interface IHybridProxy {
    function __proxy__upgradeToAndCall(
        address implementation,
        bool isBeacon,
        bytes memory data
    ) external payable;

    function __proxy__transferOwnership(address owner) external payable;
}

contract HybridProxy is IHybridProxy, Proxy, IERC1967 {
    /**
     * @dev Storage slot with the address of the current implementation.
     * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is
     * validated in the constructor.
     */
    bytes32 internal constant _IMPLEMENTATION_SLOT =
        0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;

    /**
     * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.
     * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.
     */
    bytes32 internal constant _BEACON_SLOT =
        0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;

    /**
     * @dev Storage slot with the admin of the contract.
     * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is
     * validated in the constructor.
     */
    bytes32 internal constant _ADMIN_SLOT =
        0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;

    /**
     * @dev NON STANDARD OPTIMIZATION
     * Storage slot with the address of the current target with a flag set to indicate whether it's a beacon or implementation.
     * This is the keccak-256 hash of "eip1967.proxy.hybrid" subtracted by 1, and is
     * validated in the constructor.
     */
    bytes32 internal constant _HYBRID_SLOT =
        0xdbdd003248b8c3f02315f3c03e0087f739644fba1bbc9a7223c338dd7e0bd763;

    uint256 internal constant _HYBRID_BEACON_FLAG =
        0x8000000000000000000000000000000000000000000000000000000000000000;

    error Unauthorized();
    error InvalidTarget();

    constructor(
        address owner,
        address implementation,
        bool isBeacon,
        bytes memory data
    ) {
        _setAdmin(owner);
        _upgradeToAndCall(implementation, isBeacon, data);
    }

    function __proxy__upgradeToAndCall(
        address implementation,
        bool isBeacon,
        bytes memory data
    ) public payable {
        if (_admin() != msg.sender) revert Unauthorized();
        _upgradeToAndCall(implementation, isBeacon, data);
    }

    function __proxy__transferOwnership(
        address owner
    ) external payable virtual {
        if (_admin() != msg.sender) revert Unauthorized();
        _setAdmin(owner);
    }

    /**
     * @dev Returns the current admin.
     */
    function _admin() internal view returns (address) {
        return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;
    }

    /**
     * @dev Stores a new address in the EIP1967 admin slot.
     */
    function _setAdmin(address newAdmin) internal {
        if (newAdmin == address(0)) revert InvalidTarget();

        emit AdminChanged(_admin(), newAdmin);
        StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;
    }

    function _upgradeToAndCall(
        address implementation,
        bool isBeacon,
        bytes memory data
    ) internal {
        if (isBeacon) {
            if (
                !Address.isContract(implementation) ||
                !Address.isContract(IBeacon(implementation).implementation())
            ) revert InvalidTarget();

            StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = address(0);
            StorageSlot.getAddressSlot(_BEACON_SLOT).value = implementation;

            emit Upgraded(address(0));
            emit BeaconUpgraded(implementation);
        } else {
            if (!Address.isContract(implementation)) revert InvalidTarget();

            StorageSlot.getAddressSlot(_BEACON_SLOT).value = address(0);
            StorageSlot
                .getAddressSlot(_IMPLEMENTATION_SLOT)
                .value = implementation;

            emit BeaconUpgraded(address(0));
            emit Upgraded(implementation);
        }

        StorageSlot.getUint256Slot(_HYBRID_SLOT).value =
            (isBeacon ? _HYBRID_BEACON_FLAG : 0) |
            uint160(implementation);

        if (data.length > 0) {
            Address.functionDelegateCall(_implementation(), data);
        }
    }

    function _implementation()
        internal
        view
        virtual
        override
        returns (address)
    {
        uint256 slot = StorageSlot.getUint256Slot(_HYBRID_SLOT).value;
        if (slot & _HYBRID_BEACON_FLAG == 0) {
            return address(uint160(slot));
        }
        return IBeacon(address(uint160(slot))).implementation();
    }
}

File 2 of 6 : IERC1967.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC1967.sol)

pragma solidity ^0.8.0;

/**
 * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC.
 *
 * _Available since v4.8.3._
 */
interface IERC1967 {
    /**
     * @dev Emitted when the implementation is upgraded.
     */
    event Upgraded(address indexed implementation);

    /**
     * @dev Emitted when the admin account has changed.
     */
    event AdminChanged(address previousAdmin, address newAdmin);

    /**
     * @dev Emitted when the beacon is changed.
     */
    event BeaconUpgraded(address indexed beacon);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)

pragma solidity ^0.8.0;

/**
 * @dev This is the interface that {BeaconProxy} expects of its beacon.
 */
interface IBeacon {
    /**
     * @dev Must return an address that can be used as a delegate call target.
     *
     * {BeaconProxy} will check that this address is a contract.
     */
    function implementation() external view returns (address);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)

pragma solidity ^0.8.0;

/**
 * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM
 * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to
 * be specified by overriding the virtual {_implementation} function.
 *
 * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a
 * different contract through the {_delegate} function.
 *
 * The success and return data of the delegated call will be returned back to the caller of the proxy.
 */
abstract contract Proxy {
    /**
     * @dev Delegates the current call to `implementation`.
     *
     * This function does not return to its internal call site, it will return directly to the external caller.
     */
    function _delegate(address implementation) internal virtual {
        assembly {
            // Copy msg.data. We take full control of memory in this inline assembly
            // block because it will not return to Solidity code. We overwrite the
            // Solidity scratch pad at memory position 0.
            calldatacopy(0, 0, calldatasize())

            // Call the implementation.
            // out and outsize are 0 because we don't know the size yet.
            let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)

            // Copy the returned data.
            returndatacopy(0, 0, returndatasize())

            switch result
            // delegatecall returns 0 on error.
            case 0 {
                revert(0, returndatasize())
            }
            default {
                return(0, returndatasize())
            }
        }
    }

    /**
     * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function
     * and {_fallback} should delegate.
     */
    function _implementation() internal view virtual returns (address);

    /**
     * @dev Delegates the current call to the address returned by `_implementation()`.
     *
     * This function does not return to its internal call site, it will return directly to the external caller.
     */
    function _fallback() internal virtual {
        _beforeFallback();
        _delegate(_implementation());
    }

    /**
     * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other
     * function in the contract matches the call data.
     */
    fallback() external payable virtual {
        _fallback();
    }

    /**
     * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data
     * is empty.
     */
    receive() external payable virtual {
        _fallback();
    }

    /**
     * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`
     * call, or as part of the Solidity `fallback` or `receive` functions.
     *
     * If overridden should call `super._beforeFallback()`.
     */
    function _beforeFallback() internal virtual {}
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     *
     * Furthermore, `isContract` will also return true if the target contract within
     * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
     * which only has an effect at the end of a transaction.
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

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

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

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

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

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

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

pragma solidity ^0.8.0;

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

    struct BooleanSlot {
        bool value;
    }

    struct Bytes32Slot {
        bytes32 value;
    }

    struct Uint256Slot {
        uint256 value;
    }

    struct StringSlot {
        string value;
    }

    struct BytesSlot {
        bytes value;
    }

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

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

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

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

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

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

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

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

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"implementation","type":"address"},{"internalType":"bool","name":"isBeacon","type":"bool"},{"internalType":"bytes","name":"data","type":"bytes"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InvalidTarget","type":"error"},{"inputs":[],"name":"Unauthorized","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beacon","type":"address"}],"name":"BeaconUpgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"__proxy__transferOwnership","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"implementation","type":"address"},{"internalType":"bool","name":"isBeacon","type":"bool"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"__proxy__upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"},{"stateMutability":"payable","type":"receive"}]

0x60806040523480156200001157600080fd5b50604051620011f4380380620011f48339810160408190526200003491620006f5565b6200003f8462000056565b6200004c83838362000115565b505050506200085d565b6001600160a01b0381166200007e5760405163416aebb560e11b815260040160405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f620000a96200042c565b604080516001600160a01b03928316815291841660208301520160405180910390a180620000f46000805160206200116d83398151915260001b6200046560201b620000f61760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b8115620002a55762000132836200046860201b620000f91760201c565b1580620001b65750620001b4836001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200017d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001a39190620007ec565b6200046860201b620000f91760201c565b155b15620001d55760405163416aebb560e11b815260040160405180910390fd5b6000620001ff6000805160206200118d83398151915260001b6200046560201b620000f61760201c565b80546001600160a01b0319166001600160a01b039290921691909117905582620002446000805160206200114d83398151915262000465602090811b620000f617901c565b80546001600160a01b0319166001600160a01b0392909216919091179055604051600090600080516020620011ad833981519152908290a26040516001600160a01b038416906000805160206200112d83398151915290600090a2620003a4565b620002bb836200046860201b620000f91760201c565b620002d95760405163416aebb560e11b815260040160405180910390fd5b6000620003036000805160206200114d83398151915260001b6200046560201b620000f61760201c565b80546001600160a01b0319166001600160a01b039290921691909117905582620003486000805160206200118d83398151915262000465602090811b620000f617901c565b80546001600160a01b0319166001600160a01b03929092169190911790556040516000906000805160206200112d833981519152908290a26040516001600160a01b03841690600080516020620011ad83398151915290600090a25b826001600160a01b031682620003bc576000620003c2565b600160ff1b5b17620003fc7fdbdd003248b8c3f02315f3c03e0087f739644fba1bbc9a7223c338dd7e0bd76360001b6200046560201b620000f61760201c565b558051156200042757620004256200041362000477565b826200053560201b620001081760201c565b505b505050565b6000620004566000805160206200116d83398151915260001b6200046560201b620000f61760201c565b546001600160a01b0316919050565b90565b6001600160a01b03163b151590565b600080620004b37fdbdd003248b8c3f02315f3c03e0087f739644fba1bbc9a7223c338dd7e0bd76360001b6200046560201b620000f61760201c565b549050600160ff1b8116600003620004ca57919050565b806001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000509573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200052f9190620007ec565b91505090565b60606200055d8383604051806060016040528060278152602001620011cd6027913962000564565b9392505050565b6060600080856001600160a01b0316856040516200058391906200080a565b600060405180830381855af49150503d8060008114620005c0576040519150601f19603f3d011682016040523d82523d6000602084013e620005c5565b606091505b509092509050620005d986838387620005e3565b9695505050505050565b606083156200065b57825160000362000653576001600160a01b0385163b620006535760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064015b60405180910390fd5b508162000667565b6200066783836200066f565b949350505050565b815115620006805781518083602001fd5b8060405162461bcd60e51b81526004016200064a919062000828565b80516001600160a01b0381168114620006b457600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620006ec578181015183820152602001620006d2565b50506000910152565b600080600080608085870312156200070c57600080fd5b62000717856200069c565b935062000727602086016200069c565b9250604085015180151581146200073d57600080fd5b60608601519092506001600160401b03808211156200075b57600080fd5b818701915087601f8301126200077057600080fd5b815181811115620007855762000785620006b9565b604051601f8201601f19908116603f01168101908382118183101715620007b057620007b0620006b9565b816040528281528a6020848701011115620007ca57600080fd5b620007dd836020830160208801620006cf565b979a9699509497505050505050565b600060208284031215620007ff57600080fd5b6200055d826200069c565b600082516200081e818460208701620006cf565b9190910192915050565b602081526000825180602084015262000849816040850160208701620006cf565b601f01601f19169190910160400192915050565b6108c0806200086d6000396000f3fe60806040526004361061002d5760003560e01c8063b22e1cc614610044578063f22571bf146100575761003c565b3661003c5761003a61006a565b005b61003a61006a565b61003a6100523660046106db565b61007c565b61003a6100653660046107b6565b6100bb565b61007a610075610134565b6101d3565b565b336100856101f7565b6001600160a01b0316146100ab576040516282b42960e81b815260040160405180910390fd5b6100b6838383610225565b505050565b336100c46101f7565b6001600160a01b0316146100ea576040516282b42960e81b815260040160405180910390fd5b6100f3816104d5565b50565b90565b6001600160a01b03163b151590565b606061012d838360405180606001604052806027815260200161086460279139610588565b9392505050565b7fdbdd003248b8c3f02315f3c03e0087f739644fba1bbc9a7223c338dd7e0bd76354600090600160ff1b8116820361016b57919050565b806001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101cd91906107d3565b91505090565b3660008037600080366000845af43d6000803e8080156101f2573d6000f35b3d6000fd5b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b031690565b811561038b576001600160a01b0383163b15806102a457506102a2836001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561027e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100f991906107d3565b155b156102c25760405163416aebb560e11b815260040160405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b03199081169091557fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d5080549091166001600160a01b0385161790556040516000907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b908290a26040516001600160a01b038416907f1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e90600090a2610478565b6001600160a01b0383163b6103b35760405163416aebb560e11b815260040160405180910390fd5b7fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d5080546001600160a01b03199081169091557f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549091166001600160a01b0385161790556040516000907f1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e908290a26040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a25b826001600160a01b03168261048e576000610494565b600160ff1b5b177fdbdd003248b8c3f02315f3c03e0087f739644fba1bbc9a7223c338dd7e0bd763558051156100b6576104cf6104c9610134565b82610108565b50505050565b6001600160a01b0381166104fc5760405163416aebb560e11b815260040160405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6105256101f7565b604080516001600160a01b03928316815291841660208301520160405180910390a17fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610380546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080856001600160a01b0316856040516105a59190610814565b600060405180830381855af49150503d80600081146105e0576040519150601f19603f3d011682016040523d82523d6000602084013e6105e5565b606091505b50915091506105f686838387610600565b9695505050505050565b6060831561067457825160000361066d576001600160a01b0385163b61066d5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064015b60405180910390fd5b508161067e565b61067e8383610686565b949350505050565b8151156106965781518083602001fd5b8060405162461bcd60e51b81526004016106649190610830565b6001600160a01b03811681146100f357600080fd5b634e487b7160e01b600052604160045260246000fd5b6000806000606084860312156106f057600080fd5b83356106fb816106b0565b92506020840135801515811461071057600080fd5b9150604084013567ffffffffffffffff8082111561072d57600080fd5b818601915086601f83011261074157600080fd5b813581811115610753576107536106c5565b604051601f8201601f19908116603f0116810190838211818310171561077b5761077b6106c5565b8160405282815289602084870101111561079457600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b6000602082840312156107c857600080fd5b813561012d816106b0565b6000602082840312156107e557600080fd5b815161012d816106b0565b60005b8381101561080b5781810151838201526020016107f3565b50506000910152565b600082516108268184602087016107f0565b9190910192915050565b602081526000825180602084015261084f8160408501602087016107f0565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220dd2ffb3972e6d1cbb8aed0a9fd347325f2b7b6fec7b34ab09f5ea7ab528ca27664736f6c634300081100331cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3ea3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbcbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c65640000000000000000000000000f4e2eda7582dffd2cbe5e8d6465a5cbcfbb817f000000000000000000000000fad1dc705e198294eb7aead847233f0e4153a0540000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000002048def33720000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001a00000000000000000000000006544808d8aee7eb0cf4b5b1cd4190e6613b9d73100000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f8d02c2cf39a5a32ba8a75c88f2750d0581cc21b000000000000000000000000399ae972578defdd0cc485188a6fe8fb6f6132570000000000000000000000000f4e2eda7582dffd2cbe5e8d6465a5cbcfbb817f00000000000000000000000000000000000000000000000000000000000000074d524b20303031000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003464e4400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000035697066733a2f2f516d644c63723664736b784d6e7064614a793159326b645038777842473841324765434b777273516a355a416267000000000000000000000000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x60806040526004361061002d5760003560e01c8063b22e1cc614610044578063f22571bf146100575761003c565b3661003c5761003a61006a565b005b61003a61006a565b61003a6100523660046106db565b61007c565b61003a6100653660046107b6565b6100bb565b61007a610075610134565b6101d3565b565b336100856101f7565b6001600160a01b0316146100ab576040516282b42960e81b815260040160405180910390fd5b6100b6838383610225565b505050565b336100c46101f7565b6001600160a01b0316146100ea576040516282b42960e81b815260040160405180910390fd5b6100f3816104d5565b50565b90565b6001600160a01b03163b151590565b606061012d838360405180606001604052806027815260200161086460279139610588565b9392505050565b7fdbdd003248b8c3f02315f3c03e0087f739644fba1bbc9a7223c338dd7e0bd76354600090600160ff1b8116820361016b57919050565b806001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101cd91906107d3565b91505090565b3660008037600080366000845af43d6000803e8080156101f2573d6000f35b3d6000fd5b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b031690565b811561038b576001600160a01b0383163b15806102a457506102a2836001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561027e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100f991906107d3565b155b156102c25760405163416aebb560e11b815260040160405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b03199081169091557fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d5080549091166001600160a01b0385161790556040516000907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b908290a26040516001600160a01b038416907f1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e90600090a2610478565b6001600160a01b0383163b6103b35760405163416aebb560e11b815260040160405180910390fd5b7fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d5080546001600160a01b03199081169091557f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549091166001600160a01b0385161790556040516000907f1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e908290a26040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a25b826001600160a01b03168261048e576000610494565b600160ff1b5b177fdbdd003248b8c3f02315f3c03e0087f739644fba1bbc9a7223c338dd7e0bd763558051156100b6576104cf6104c9610134565b82610108565b50505050565b6001600160a01b0381166104fc5760405163416aebb560e11b815260040160405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6105256101f7565b604080516001600160a01b03928316815291841660208301520160405180910390a17fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610380546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080856001600160a01b0316856040516105a59190610814565b600060405180830381855af49150503d80600081146105e0576040519150601f19603f3d011682016040523d82523d6000602084013e6105e5565b606091505b50915091506105f686838387610600565b9695505050505050565b6060831561067457825160000361066d576001600160a01b0385163b61066d5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064015b60405180910390fd5b508161067e565b61067e8383610686565b949350505050565b8151156106965781518083602001fd5b8060405162461bcd60e51b81526004016106649190610830565b6001600160a01b03811681146100f357600080fd5b634e487b7160e01b600052604160045260246000fd5b6000806000606084860312156106f057600080fd5b83356106fb816106b0565b92506020840135801515811461071057600080fd5b9150604084013567ffffffffffffffff8082111561072d57600080fd5b818601915086601f83011261074157600080fd5b813581811115610753576107536106c5565b604051601f8201601f19908116603f0116810190838211818310171561077b5761077b6106c5565b8160405282815289602084870101111561079457600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b6000602082840312156107c857600080fd5b813561012d816106b0565b6000602082840312156107e557600080fd5b815161012d816106b0565b60005b8381101561080b5781810151838201526020016107f3565b50506000910152565b600082516108268184602087016107f0565b9190910192915050565b602081526000825180602084015261084f8160408501602087016107f0565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220dd2ffb3972e6d1cbb8aed0a9fd347325f2b7b6fec7b34ab09f5ea7ab528ca27664736f6c63430008110033

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
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.