CRO Price: $0.09 (-0.95%)

Contract

0xff9361dFF9F485f563B6e947B4ADc51F9190a2c8
Transaction Hash
Method
Block
From
To
Value
Deposit145126682024-06-21 16:04:432 mins ago1718985883IN
0xff9361dF...F9190a2c8
0 CRO0.62299835,050
Deposit145124282024-06-21 15:42:0425 mins ago1718984524IN
0xff9361dF...F9190a2c8
0 CRO0.72523055,050
Deposit145120762024-06-21 15:08:5258 mins ago1718982532IN
0xff9361dF...F9190a2c8
0 CRO0.54724835,050
Deposit145115472024-06-21 14:18:511 hr ago1718979531IN
0xff9361dF...F9190a2c8
0 CRO0.54724835,050
Deposit145115412024-06-21 14:18:161 hr ago1718979496IN
0xff9361dF...F9190a2c8
0 CRO0.54724835,050
Deposit145114422024-06-21 14:08:541 hr ago1718978934IN
0xff9361dF...F9190a2c8
0 CRO0.63490625,050
Deposit145113572024-06-21 14:00:512 hrs ago1718978451IN
0xff9361dF...F9190a2c8
0 CRO1.5935785,050
Deposit145113472024-06-21 13:59:542 hrs ago1718978394IN
0xff9361dF...F9190a2c8
0 CRO0.54724835,050
Deposit145108892024-06-21 13:16:412 hrs ago1718975801IN
0xff9361dF...F9190a2c8
0 CRO0.54724835,050
Deposit145107812024-06-21 13:06:303 hrs ago1718975190IN
0xff9361dF...F9190a2c8
0 CRO0.63360335,050
Deposit145106912024-06-21 12:58:003 hrs ago1718974680IN
0xff9361dF...F9190a2c8
0 CRO1.5935785,050
Deposit145103462024-06-21 12:25:253 hrs ago1718972725IN
0xff9361dF...F9190a2c8
0 CRO0.63360335,050
Deposit145096472024-06-21 11:19:254 hrs ago1718968765IN
0xff9361dF...F9190a2c8
0 CRO0.63360335,050
Deposit145094912024-06-21 11:04:425 hrs ago1718967882IN
0xff9361dF...F9190a2c8
0 CRO1.66138945,050
Deposit145094832024-06-21 11:03:575 hrs ago1718967837IN
0xff9361dF...F9190a2c8
0 CRO0.63360335,050
Deposit145094402024-06-21 10:59:525 hrs ago1718967592IN
0xff9361dF...F9190a2c8
0 CRO0.61505975,050
Deposit145093022024-06-21 10:46:515 hrs ago1718966811IN
0xff9361dF...F9190a2c8
0 CRO0.63360335,050
Deposit145090872024-06-21 10:26:335 hrs ago1718965593IN
0xff9361dF...F9190a2c8
0 CRO1.5794385,050
Deposit145090662024-06-21 10:24:345 hrs ago1718965474IN
0xff9361dF...F9190a2c8
0 CRO0.54724835,050
Batch Withdraw145090602024-06-21 10:24:005 hrs ago1718965440IN
0xff9361dF...F9190a2c8
0 CRO1.24830955,050
Deposit145089472024-06-21 10:13:225 hrs ago1718964802IN
0xff9361dF...F9190a2c8
0 CRO0.63360335,050
Batch Withdraw145088872024-06-21 10:07:425 hrs ago1718964462IN
0xff9361dF...F9190a2c8
0 CRO1.148375,050
Deposit145084752024-06-21 9:28:496 hrs ago1718962129IN
0xff9361dF...F9190a2c8
0 CRO0.63093695,050
Deposit145083772024-06-21 9:19:346 hrs ago1718961574IN
0xff9361dF...F9190a2c8
0 CRO0.63360335,050
Deposit145083072024-06-21 9:12:586 hrs ago1718961178IN
0xff9361dF...F9190a2c8
0 CRO1.66535875,050
View all transactions

Parent Transaction Hash Block From To Value
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ERC1967ProxyWithAdminControl

Compiler Version
v0.8.3+commit.8d00100c

Optimization Enabled:
Yes with 10 runs

Other Settings:
default evmVersion
File 1 of 9 : ERC1967ProxyWithAdminControl.sol
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;

import "openzeppelin-solidity/contracts/access/Ownable.sol";
import "openzeppelin-solidity/contracts/proxy/ERC1967/ERC1967Proxy.sol";


contract ERC1967ProxyWithAdminControl is  ERC1967Proxy {

  event ImplementationChanged(
    uint256 indexed timestamp,
    address newImplementationAddress
  );

  modifier onlyAdmin() {
      require(msg.sender == _getAdmin(), "ERC1967ProxyWithAdminControl: caller is not the admin");
      _;
  }

  function upgradeTo(address _newImplementation) external onlyAdmin {
    _upgradeTo(_newImplementation);
    emit ImplementationChanged(block.timestamp, _newImplementation);
  }

  function changeProxyAdmin(address _newAdmin) external onlyAdmin {
    require(_newAdmin != address(0), "New admin cannot be the zero address");
    _changeAdmin(_newAdmin);
  }

  function implementation() external view returns (address) {
    return _implementation();
  }

  function getProxyAdmin() external view returns (address) {
    return _getAdmin();
  }

  constructor(address _logic, bytes memory _data) 
    ERC1967Proxy(_logic, _data) {
        _changeAdmin(msg.sender);
    }

}

File 2 of 9 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../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.
 *
 * By default, the owner account will be the one that deploys the contract. 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;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _setOwner(_msgSender());
    }

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _setOwner(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 {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _setOwner(newOwner);
    }

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 3 of 9 : ERC1967Proxy.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../Proxy.sol";
import "./ERC1967Upgrade.sol";

/**
 * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an
 * implementation address that can be changed. This address is stored in storage in the location specified by
 * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the
 * implementation behind the proxy.
 */
contract ERC1967Proxy is Proxy, ERC1967Upgrade {
    /**
     * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.
     *
     * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded
     * function call, and allows initializating the storage of the proxy like a Solidity constructor.
     */
    constructor(address _logic, bytes memory _data) payable {
        assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256("eip1967.proxy.implementation")) - 1));
        _upgradeToAndCall(_logic, _data, false);
    }

    /**
     * @dev Returns the current implementation address.
     */
    function _implementation() internal view virtual override returns (address impl) {
        return ERC1967Upgrade._getImplementation();
    }
}

File 4 of 9 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

File 5 of 9 : Proxy.sol
// SPDX-License-Identifier: MIT

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 internall 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 overriden 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 internall 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 overriden should call `super._beforeFallback()`.
     */
    function _beforeFallback() internal virtual {}
}

File 6 of 9 : ERC1967Upgrade.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.2;

import "../beacon/IBeacon.sol";
import "../../utils/Address.sol";
import "../../utils/StorageSlot.sol";

/**
 * @dev This abstract contract provides getters and event emitting update functions for
 * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.
 *
 * _Available since v4.1._
 *
 * @custom:oz-upgrades-unsafe-allow delegatecall
 */
abstract contract ERC1967Upgrade {
    // This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1
    bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;

    /**
     * @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 Emitted when the implementation is upgraded.
     */
    event Upgraded(address indexed implementation);

    /**
     * @dev Returns the current implementation address.
     */
    function _getImplementation() internal view returns (address) {
        return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
    }

    /**
     * @dev Stores a new address in the EIP1967 implementation slot.
     */
    function _setImplementation(address newImplementation) private {
        require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract");
        StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
    }

    /**
     * @dev Perform implementation upgrade
     *
     * Emits an {Upgraded} event.
     */
    function _upgradeTo(address newImplementation) internal {
        _setImplementation(newImplementation);
        emit Upgraded(newImplementation);
    }

    /**
     * @dev Perform implementation upgrade with additional setup call.
     *
     * Emits an {Upgraded} event.
     */
    function _upgradeToAndCall(
        address newImplementation,
        bytes memory data,
        bool forceCall
    ) internal {
        _upgradeTo(newImplementation);
        if (data.length > 0 || forceCall) {
            Address.functionDelegateCall(newImplementation, data);
        }
    }

    /**
     * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.
     *
     * Emits an {Upgraded} event.
     */
    function _upgradeToAndCallSecure(
        address newImplementation,
        bytes memory data,
        bool forceCall
    ) internal {
        address oldImplementation = _getImplementation();

        // Initial upgrade and setup call
        _setImplementation(newImplementation);
        if (data.length > 0 || forceCall) {
            Address.functionDelegateCall(newImplementation, data);
        }

        // Perform rollback test if not already in progress
        StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT);
        if (!rollbackTesting.value) {
            // Trigger rollback using upgradeTo from the new implementation
            rollbackTesting.value = true;
            Address.functionDelegateCall(
                newImplementation,
                abi.encodeWithSignature("upgradeTo(address)", oldImplementation)
            );
            rollbackTesting.value = false;
            // Check rollback was effective
            require(oldImplementation == _getImplementation(), "ERC1967Upgrade: upgrade breaks further upgrades");
            // Finally reset to the new implementation and log the upgrade
            _upgradeTo(newImplementation);
        }
    }

    /**
     * @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 Emitted when the admin account has changed.
     */
    event AdminChanged(address previousAdmin, address newAdmin);

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

    /**
     * @dev Stores a new address in the EIP1967 admin slot.
     */
    function _setAdmin(address newAdmin) private {
        require(newAdmin != address(0), "ERC1967: new admin is the zero address");
        StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;
    }

    /**
     * @dev Changes the admin of the proxy.
     *
     * Emits an {AdminChanged} event.
     */
    function _changeAdmin(address newAdmin) internal {
        emit AdminChanged(_getAdmin(), newAdmin);
        _setAdmin(newAdmin);
    }

    /**
     * @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 Emitted when the beacon is upgraded.
     */
    event BeaconUpgraded(address indexed beacon);

    /**
     * @dev Returns the current beacon.
     */
    function _getBeacon() internal view returns (address) {
        return StorageSlot.getAddressSlot(_BEACON_SLOT).value;
    }

    /**
     * @dev Stores a new beacon in the EIP1967 beacon slot.
     */
    function _setBeacon(address newBeacon) private {
        require(Address.isContract(newBeacon), "ERC1967: new beacon is not a contract");
        require(
            Address.isContract(IBeacon(newBeacon).implementation()),
            "ERC1967: beacon implementation is not a contract"
        );
        StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;
    }

    /**
     * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does
     * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).
     *
     * Emits a {BeaconUpgraded} event.
     */
    function _upgradeBeaconToAndCall(
        address newBeacon,
        bytes memory data,
        bool forceCall
    ) internal {
        _setBeacon(newBeacon);
        emit BeaconUpgraded(newBeacon);
        if (data.length > 0 || forceCall) {
            Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);
        }
    }
}

File 7 of 9 : IBeacon.sol
// SPDX-License-Identifier: MIT

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);
}

File 8 of 9 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @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
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 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://diligence.consensys.net/posts/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.5.11/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 functionCall(target, data, "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");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return _verifyCallResult(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) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(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) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) private pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // 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 {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 9 of 9 : StorageSlot.sol
// SPDX-License-Identifier: MIT

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:
 * ```
 * 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`, and `uint256`._
 */
library StorageSlot {
    struct AddressSlot {
        address value;
    }

    struct BooleanSlot {
        bool value;
    }

    struct Bytes32Slot {
        bytes32 value;
    }

    struct Uint256Slot {
        uint256 value;
    }

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

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

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

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_logic","type":"address"},{"internalType":"bytes","name":"_data","type":"bytes"}],"stateMutability":"nonpayable","type":"constructor"},{"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":"uint256","name":"timestamp","type":"uint256"},{"indexed":false,"internalType":"address","name":"newImplementationAddress","type":"address"}],"name":"ImplementationChanged","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":"_newAdmin","type":"address"}],"name":"changeProxyAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getProxyAdmin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"implementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_newImplementation","type":"address"}],"name":"upgradeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040523480156200001157600080fd5b5060405162000da138038062000da1833981016040819052620000349162000471565b81816200006360017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd6200059a565b60008051602062000d5a833981519152146200008f57634e487b7160e01b600052600160045260246000fd5b6200009d82826000620000b3565b50620000ab905033620000f0565b505062000603565b620000be836200014b565b600082511180620000cc5750805b15620000eb57620000e983836200018d60201b620002301760201c565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6200011b620001bc565b604080516001600160a01b03928316815291841660208301520160405180910390a16200014881620001f5565b50565b6200015681620002aa565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060620001b5838360405180606001604052806027815260200162000d7a602791396200034d565b9392505050565b6000620001e660008051602062000d3a83398151915260001b6200042a60201b6200025c1760201c565b546001600160a01b0316905090565b6001600160a01b038116620002605760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b806200028960008051602062000d3a83398151915260001b6200042a60201b6200025c1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b620002c0816200042d60201b6200025f1760201c565b620003245760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840162000257565b806200028960008051602062000d5a83398151915260001b6200042a60201b6200025c1760201c565b6060833b620003ae5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b606482015260840162000257565b600080856001600160a01b031685604051620003cb919062000547565b600060405180830381855af49150503d806000811462000408576040519150601f19603f3d011682016040523d82523d6000602084013e6200040d565b606091505b5090925090506200042082828662000433565b9695505050505050565b90565b3b151590565b6060831562000444575081620001b5565b825115620004555782518084602001fd5b8160405162461bcd60e51b815260040162000257919062000565565b6000806040838503121562000484578182fd5b82516001600160a01b03811681146200049b578283fd5b60208401519092506001600160401b0380821115620004b8578283fd5b818501915085601f830112620004cc578283fd5b815181811115620004e157620004e1620005ed565b604051601f8201601f19908116603f011681019083821181831017156200050c576200050c620005ed565b8160405282815288602084870101111562000525578586fd5b62000538836020830160208801620005be565b80955050505050509250929050565b600082516200055b818460208701620005be565b9190910192915050565b600060208252825180602084015262000586816040850160208701620005be565b601f01601f19169190910160400192915050565b600082821015620005b957634e487b7160e01b81526011600452602481fd5b500390565b60005b83811015620005db578181015183820152602001620005c1565b83811115620000e95750506000910152565b634e487b7160e01b600052604160045260246000fd5b61072780620006136000396000f3fe6080604052600436106100435760003560e01c80633659cfe61461005a5780635c60da1b1461007a5780638b3240a0146100a55780639f712f2f146100ba57610052565b36610052576100506100da565b005b6100506100da565b34801561006657600080fd5b5061005061007536600461057b565b6100ec565b34801561008657600080fd5b5061008f610171565b60405161009c91906105be565b60405180910390f35b3480156100b157600080fd5b5061008f610180565b3480156100c657600080fd5b506100506100d536600461057b565b61018a565b6100ea6100e5610265565b61026f565b565b6100f4610293565b6001600160a01b0316336001600160a01b03161461012d5760405162461bcd60e51b815260040161012490610605565b60405180910390fd5b610136816102b4565b427fd9f266625586f1434161fb2b5873b4869b7595dad10f23e8825da8ea987202028260405161016691906105be565b60405180910390a250565b600061017b610265565b905090565b600061017b610293565b610192610293565b6001600160a01b0316336001600160a01b0316146101c25760405162461bcd60e51b815260040161012490610605565b6001600160a01b0381166102245760405162461bcd60e51b8152602060048201526024808201527f4e65772061646d696e2063616e6e6f7420626520746865207a65726f206164646044820152637265737360e01b6064820152608401610124565b61022d816102f4565b50565b606061025583836040518060600160405280602781526020016106cb60279139610348565b9392505050565b90565b3b151590565b600061017b61041c565b3660008037600080366000845af43d6000803e80801561028e573d6000f35b3d6000fd5b600060008051602061068b8339815191525b546001600160a01b0316905090565b6102bd81610432565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61031d610293565b604080516001600160a01b03928316815291841660208301520160405180910390a161022d816104c8565b6060833b6103a75760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610124565b600080856001600160a01b0316856040516103c291906105a2565b600060405180830381855af49150503d80600081146103fd576040519150601f19603f3d011682016040523d82523d6000602084013e610402565b606091505b5091509150610412828286610542565b9695505050505050565b60006000805160206106ab8339815191526102a5565b803b6104965760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610124565b806000805160206106ab8339815191525b80546001600160a01b0319166001600160a01b039290921691909117905550565b6001600160a01b03811661052d5760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b6064820152608401610124565b8060008051602061068b8339815191526104a7565b60608315610551575081610255565b8251156105615782518084602001fd5b8160405162461bcd60e51b815260040161012491906105d2565b60006020828403121561058c578081fd5b81356001600160a01b0381168114610255578182fd5b600082516105b481846020870161065a565b9190910192915050565b6001600160a01b0391909116815260200190565b60006020825282518060208401526105f181604085016020870161065a565b601f01601f19169190910160400192915050565b60208082526035908201527f4552433139363750726f78795769746841646d696e436f6e74726f6c3a206361604082015274363632b91034b9903737ba103a34329030b236b4b760591b606082015260800190565b60005b8381101561067557818101518382015260200161065d565b83811115610684576000848401525b5050505056feb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220a426952950a5fecc99d4e01eb4493de95dd9b0054652be5f92582650369b754864736f6c63430008030033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564000000000000000000000000c26a3d101a05f25c8d632029afa9a73714101f0000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000064c0c53b8b000000000000000000000000dd73dea10abc2bff99c60882ec5b2b81bb1dc5b20000000000000000000000001bc9b7d4be47b76965a3f8e910b9ddd83150840f000000000000000000000000b3831584acb95ed9ccb0c11f677b5ad01deaeec000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x6080604052600436106100435760003560e01c80633659cfe61461005a5780635c60da1b1461007a5780638b3240a0146100a55780639f712f2f146100ba57610052565b36610052576100506100da565b005b6100506100da565b34801561006657600080fd5b5061005061007536600461057b565b6100ec565b34801561008657600080fd5b5061008f610171565b60405161009c91906105be565b60405180910390f35b3480156100b157600080fd5b5061008f610180565b3480156100c657600080fd5b506100506100d536600461057b565b61018a565b6100ea6100e5610265565b61026f565b565b6100f4610293565b6001600160a01b0316336001600160a01b03161461012d5760405162461bcd60e51b815260040161012490610605565b60405180910390fd5b610136816102b4565b427fd9f266625586f1434161fb2b5873b4869b7595dad10f23e8825da8ea987202028260405161016691906105be565b60405180910390a250565b600061017b610265565b905090565b600061017b610293565b610192610293565b6001600160a01b0316336001600160a01b0316146101c25760405162461bcd60e51b815260040161012490610605565b6001600160a01b0381166102245760405162461bcd60e51b8152602060048201526024808201527f4e65772061646d696e2063616e6e6f7420626520746865207a65726f206164646044820152637265737360e01b6064820152608401610124565b61022d816102f4565b50565b606061025583836040518060600160405280602781526020016106cb60279139610348565b9392505050565b90565b3b151590565b600061017b61041c565b3660008037600080366000845af43d6000803e80801561028e573d6000f35b3d6000fd5b600060008051602061068b8339815191525b546001600160a01b0316905090565b6102bd81610432565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61031d610293565b604080516001600160a01b03928316815291841660208301520160405180910390a161022d816104c8565b6060833b6103a75760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610124565b600080856001600160a01b0316856040516103c291906105a2565b600060405180830381855af49150503d80600081146103fd576040519150601f19603f3d011682016040523d82523d6000602084013e610402565b606091505b5091509150610412828286610542565b9695505050505050565b60006000805160206106ab8339815191526102a5565b803b6104965760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610124565b806000805160206106ab8339815191525b80546001600160a01b0319166001600160a01b039290921691909117905550565b6001600160a01b03811661052d5760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b6064820152608401610124565b8060008051602061068b8339815191526104a7565b60608315610551575081610255565b8251156105615782518084602001fd5b8160405162461bcd60e51b815260040161012491906105d2565b60006020828403121561058c578081fd5b81356001600160a01b0381168114610255578182fd5b600082516105b481846020870161065a565b9190910192915050565b6001600160a01b0391909116815260200190565b60006020825282518060208401526105f181604085016020870161065a565b601f01601f19169190910160400192915050565b60208082526035908201527f4552433139363750726f78795769746841646d696e436f6e74726f6c3a206361604082015274363632b91034b9903737ba103a34329030b236b4b760591b606082015260800190565b60005b8381101561067557818101518382015260200161065d565b83811115610684576000848401525b5050505056feb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220a426952950a5fecc99d4e01eb4493de95dd9b0054652be5f92582650369b754864736f6c63430008030033

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

000000000000000000000000c26a3d101a05f25c8d632029afa9a73714101f0000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000064c0c53b8b000000000000000000000000dd73dea10abc2bff99c60882ec5b2b81bb1dc5b20000000000000000000000001bc9b7d4be47b76965a3f8e910b9ddd83150840f000000000000000000000000b3831584acb95ed9ccb0c11f677b5ad01deaeec000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _logic (address): 0xc26a3d101A05F25c8d632029AFA9A73714101f00
Arg [1] : _data (bytes): 0xc0c53b8b000000000000000000000000dd73dea10abc2bff99c60882ec5b2b81bb1dc5b20000000000000000000000001bc9b7d4be47b76965a3f8e910b9ddd83150840f000000000000000000000000b3831584acb95ed9ccb0c11f677b5ad01deaeec0

-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 000000000000000000000000c26a3d101a05f25c8d632029afa9a73714101f00
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000064
Arg [3] : c0c53b8b000000000000000000000000dd73dea10abc2bff99c60882ec5b2b81
Arg [4] : bb1dc5b20000000000000000000000001bc9b7d4be47b76965a3f8e910b9ddd8
Arg [5] : 3150840f000000000000000000000000b3831584acb95ed9ccb0c11f677b5ad0
Arg [6] : 1deaeec000000000000000000000000000000000000000000000000000000000


Block Transaction Gas Used Reward
view all blocks validated

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
[ 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.