ETH Price: $1,786.29 (+9.68%)

Contract

0xEB622bf7a42e480971A6558BEa17f1Eb7e628F2e

Overview

ETH Balance

0 ETH

ETH Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Deploy Limit Ord...2796569912024-11-29 21:09:45144 days ago1732914585IN
0xEB622bf7...b7e628F2e
0 ETH0.000003160.01
Deploy Limit Ord...2788853412024-11-27 15:11:47146 days ago1732720307IN
0xEB622bf7...b7e628F2e
0 ETH0.00000890.032833
Deploy Limit Ord...2785260452024-11-26 14:03:43147 days ago1732629823IN
0xEB622bf7...b7e628F2e
0 ETH0.000017470.01
Deploy Limit Ord...2759394012024-11-19 1:25:39155 days ago1731979539IN
0xEB622bf7...b7e628F2e
0 ETH0.000003040.01
Deploy Limit Ord...2758909362024-11-18 22:02:25155 days ago1731967345IN
0xEB622bf7...b7e628F2e
0 ETH0.000003510.01
Deploy Limit Ord...2758909322024-11-18 22:02:24155 days ago1731967344IN
0xEB622bf7...b7e628F2e
0 ETH0.00000350.01
Deploy Limit Ord...2758909282024-11-18 22:02:23155 days ago1731967343IN
0xEB622bf7...b7e628F2e
0 ETH0.000003510.01
Deploy Limit Ord...2734855802024-11-11 22:03:52162 days ago1731362632IN
0xEB622bf7...b7e628F2e
0 ETH0.000007960.01
Deploy Limit Ord...2734855652024-11-11 22:03:49162 days ago1731362629IN
0xEB622bf7...b7e628F2e
0 ETH0.000007960.01
Deploy Limit Ord...2535425682024-09-14 20:25:07220 days ago1726345507IN
0xEB622bf7...b7e628F2e
0 ETH0.000002560.01
Deploy Limit Ord...2535425642024-09-14 20:25:06220 days ago1726345506IN
0xEB622bf7...b7e628F2e
0 ETH0.000002560.01
Deploy Limit Ord...2535425602024-09-14 20:25:05220 days ago1726345505IN
0xEB622bf7...b7e628F2e
0 ETH0.000002560.01
Deploy Limit Ord...2535425562024-09-14 20:25:04220 days ago1726345504IN
0xEB622bf7...b7e628F2e
0 ETH0.000002560.01
Deploy Limit Ord...2535425522024-09-14 20:25:03220 days ago1726345503IN
0xEB622bf7...b7e628F2e
0 ETH0.000002560.01
Deploy Limit Ord...2452821162024-08-21 19:26:36244 days ago1724268396IN
0xEB622bf7...b7e628F2e
0 ETH0.000002530.01
Deploy Limit Ord...2452820852024-08-21 19:26:29244 days ago1724268389IN
0xEB622bf7...b7e628F2e
0 ETH0.000002490.01
Deploy Limit Ord...2452820592024-08-21 19:26:23244 days ago1724268383IN
0xEB622bf7...b7e628F2e
0 ETH0.000002490.01
Deploy Limit Ord...2452820332024-08-21 19:26:16244 days ago1724268376IN
0xEB622bf7...b7e628F2e
0 ETH0.000002490.01
Deploy Limit Ord...2452820082024-08-21 19:26:10244 days ago1724268370IN
0xEB622bf7...b7e628F2e
0 ETH0.000002490.01
Deploy Limit Ord...2373142092024-07-29 14:56:43267 days ago1722265003IN
0xEB622bf7...b7e628F2e
0 ETH0.000003880.015181
Deploy Limit Ord...2358289122024-07-25 7:27:50272 days ago1721892470IN
0xEB622bf7...b7e628F2e
0 ETH0.000002590.01
Deploy Limit Ord...2358288852024-07-25 7:27:43272 days ago1721892463IN
0xEB622bf7...b7e628F2e
0 ETH0.000002590.01
Deploy Limit Ord...2310861032024-07-11 12:46:25285 days ago1720701985IN
0xEB622bf7...b7e628F2e
0 ETH0.000037930.15344
Deploy Limit Ord...2305070822024-07-09 20:27:09287 days ago1720556829IN
0xEB622bf7...b7e628F2e
0 ETH0.000002590.01
Deploy Limit Ord...2301202782024-07-08 17:28:43288 days ago1720459723IN
0xEB622bf7...b7e628F2e
0 ETH0.000003660.013809
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
2796569912024-11-29 21:09:45144 days ago1732914585
0xEB622bf7...b7e628F2e
 Contract Creation0 ETH
2788853412024-11-27 15:11:47146 days ago1732720307
0xEB622bf7...b7e628F2e
 Contract Creation0 ETH
2785260452024-11-26 14:03:43147 days ago1732629823
0xEB622bf7...b7e628F2e
 Contract Creation0 ETH
2759394012024-11-19 1:25:39155 days ago1731979539
0xEB622bf7...b7e628F2e
 Contract Creation0 ETH
2758909362024-11-18 22:02:25155 days ago1731967345
0xEB622bf7...b7e628F2e
 Contract Creation0 ETH
2758909322024-11-18 22:02:24155 days ago1731967344
0xEB622bf7...b7e628F2e
 Contract Creation0 ETH
2758909282024-11-18 22:02:23155 days ago1731967343
0xEB622bf7...b7e628F2e
 Contract Creation0 ETH
2734855802024-11-11 22:03:52162 days ago1731362632
0xEB622bf7...b7e628F2e
 Contract Creation0 ETH
2734855652024-11-11 22:03:49162 days ago1731362629
0xEB622bf7...b7e628F2e
 Contract Creation0 ETH
2535425682024-09-14 20:25:07220 days ago1726345507
0xEB622bf7...b7e628F2e
 Contract Creation0 ETH
2535425642024-09-14 20:25:06220 days ago1726345506
0xEB622bf7...b7e628F2e
 Contract Creation0 ETH
2535425602024-09-14 20:25:05220 days ago1726345505
0xEB622bf7...b7e628F2e
 Contract Creation0 ETH
2535425562024-09-14 20:25:04220 days ago1726345504
0xEB622bf7...b7e628F2e
 Contract Creation0 ETH
2535425522024-09-14 20:25:03220 days ago1726345503
0xEB622bf7...b7e628F2e
 Contract Creation0 ETH
2452821162024-08-21 19:26:36244 days ago1724268396
0xEB622bf7...b7e628F2e
 Contract Creation0 ETH
2452820852024-08-21 19:26:29244 days ago1724268389
0xEB622bf7...b7e628F2e
 Contract Creation0 ETH
2452820592024-08-21 19:26:23244 days ago1724268383
0xEB622bf7...b7e628F2e
 Contract Creation0 ETH
2452820332024-08-21 19:26:16244 days ago1724268376
0xEB622bf7...b7e628F2e
 Contract Creation0 ETH
2452820082024-08-21 19:26:10244 days ago1724268370
0xEB622bf7...b7e628F2e
 Contract Creation0 ETH
2373142092024-07-29 14:56:43267 days ago1722265003
0xEB622bf7...b7e628F2e
 Contract Creation0 ETH
2358289122024-07-25 7:27:50272 days ago1721892470
0xEB622bf7...b7e628F2e
 Contract Creation0 ETH
2358288852024-07-25 7:27:43272 days ago1721892463
0xEB622bf7...b7e628F2e
 Contract Creation0 ETH
2310861032024-07-11 12:46:25285 days ago1720701985
0xEB622bf7...b7e628F2e
 Contract Creation0 ETH
2305070822024-07-09 20:27:09287 days ago1720556829
0xEB622bf7...b7e628F2e
 Contract Creation0 ETH
2301202782024-07-08 17:28:43288 days ago1720459723
0xEB622bf7...b7e628F2e
 Contract Creation0 ETH
View All Internal Transactions

Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
LimitOrderBookFactory

Compiler Version
v0.8.21+commit.d9974bed

Optimization Enabled:
Yes with 100000000 runs

Other Settings:
paris EvmVersion
File 1 of 13 : LimitOrderBookFactory.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.21;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/proxy/beacon/BeaconProxy.sol";
import "./LimitOrderBookBeacon.sol";

/**
 * @title Limit Order Book Factory: Contract to deploy limit
 * order book for perpetuals
 * */
contract LimitOrderBookFactory is Ownable {
    // New order book
    event PerpetualLimitOrderBookDeployed(
        uint24 indexed perpetualId,
        address perpManagerAddress,
        address limitOrderBookAddress
    );

    // Authorization to execute orders without delay was granted granted or revoked
    event SetExecutor(address executor, bool authorized);

    // set gas limit for callback function
    event SetCallbackGasLimit(uint24 indexed perpetualId, uint32 gasLimit);

    uint8 private constant CANCEL_DELAY_SEC = 10; // number of seconds before order can be cancelled

    bytes4 private constant INITIALIZER_SELECTOR =
        bytes4(keccak256("initialize(address,uint24,uint8)"));

    // Perpetual Id => Address of Order Book
    mapping(uint24 => address) public orderBooks;

    // Addresses that are pre-authorized to execute orders
    mapping(address => bool) public approvedExecutor;

    LimitOrderBookBeacon immutable beacon;

    constructor(address _implementation) {
        beacon = new LimitOrderBookBeacon(_implementation);
    }

    /**
     * @notice Deploys limit order book beacon proxy contract.
     * @param _perpetualManagerAddr the address of perpetual proxy manager.
     * @param _perpetualId The id of perpetual.
     * */
    function deployLimitOrderBookProxy(
        address _perpetualManagerAddr,
        uint24 _perpetualId
    ) external onlyOwner {
        require(orderBooks[_perpetualId] == address(0), "orderbook already deployed");
        BeaconProxy limitOrderBook = new BeaconProxy(
            address(beacon),
            abi.encodeWithSelector(
                INITIALIZER_SELECTOR,
                _perpetualManagerAddr,
                _perpetualId,
                CANCEL_DELAY_SEC
            )
        );
        orderBooks[_perpetualId] = address(limitOrderBook);
        emit PerpetualLimitOrderBookDeployed(
            _perpetualId,
            _perpetualManagerAddr,
            address(limitOrderBook)
        );
    }

    /**
     * Address of the limit order book beacon contract
     */
    function getBeacon() public view returns (address) {
        return address(beacon);
    }

    /**
     * Address of the limit order book implementation contract
     */
    function getImplementation() public view returns (address) {
        return beacon.implementation();
    }

    /**
     * Give permission to execute trades
     * @param _executor Address of the executor to add
     */
    function addExecutor(address _executor) external onlyOwner {
        require(!approvedExecutor[_executor], "already authorized");
        approvedExecutor[_executor] = true;
        emit SetExecutor(_executor, true);
    }

    /**
     * Revoke permission to execute trades
     * @param _executor Address of the executor to remove
     */
    function removeExecutor(address _executor) external onlyOwner {
        require(approvedExecutor[_executor], "not authorized");
        approvedExecutor[_executor] = false;
        emit SetExecutor(_executor, false);
    }
}

File 2 of 13 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)

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() {
        _transferOwnership(_msgSender());
    }

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

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 3 of 13 : draft-IERC1822.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)

pragma solidity ^0.8.0;

/**
 * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified
 * proxy whose upgrades are fully controlled by the current implementation.
 */
interface IERC1822Proxiable {
    /**
     * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation
     * address.
     *
     * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks
     * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this
     * function revert if invoked through a proxy.
     */
    function proxiableUUID() external view returns (bytes32);
}

File 4 of 13 : 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);
}

File 5 of 13 : BeaconProxy.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (proxy/beacon/BeaconProxy.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev This contract implements a proxy that gets the implementation address for each call from an {UpgradeableBeacon}.
 *
 * The beacon address is stored in storage slot `uint256(keccak256('eip1967.proxy.beacon')) - 1`, so that it doesn't
 * conflict with the storage layout of the implementation behind the proxy.
 *
 * _Available since v3.4._
 */
contract BeaconProxy is Proxy, ERC1967Upgrade {
    /**
     * @dev Initializes the proxy with `beacon`.
     *
     * If `data` is nonempty, it's used as data in a delegate call to the implementation returned by the beacon. This
     * will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity
     * constructor.
     *
     * Requirements:
     *
     * - `beacon` must be a contract with the interface {IBeacon}.
     */
    constructor(address beacon, bytes memory data) payable {
        _upgradeBeaconToAndCall(beacon, data, false);
    }

    /**
     * @dev Returns the current beacon address.
     */
    function _beacon() internal view virtual returns (address) {
        return _getBeacon();
    }

    /**
     * @dev Returns the current implementation address of the associated beacon.
     */
    function _implementation() internal view virtual override returns (address) {
        return IBeacon(_getBeacon()).implementation();
    }

    /**
     * @dev Changes the proxy to use a new beacon. Deprecated: see {_upgradeBeaconToAndCall}.
     *
     * If `data` is nonempty, it's used as data in a delegate call to the implementation returned by the beacon.
     *
     * Requirements:
     *
     * - `beacon` must be a contract.
     * - The implementation returned by `beacon` must be a contract.
     */
    function _setBeacon(address beacon, bytes memory data) internal virtual {
        _upgradeBeaconToAndCall(beacon, data, false);
    }
}

File 6 of 13 : IBeacon.sol
// 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);
}

File 7 of 13 : UpgradeableBeacon.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (proxy/beacon/UpgradeableBeacon.sol)

pragma solidity ^0.8.0;

import "./IBeacon.sol";
import "../../access/Ownable.sol";
import "../../utils/Address.sol";

/**
 * @dev This contract is used in conjunction with one or more instances of {BeaconProxy} to determine their
 * implementation contract, which is where they will delegate all function calls.
 *
 * An owner is able to change the implementation the beacon points to, thus upgrading the proxies that use this beacon.
 */
contract UpgradeableBeacon is IBeacon, Ownable {
    address private _implementation;

    /**
     * @dev Emitted when the implementation returned by the beacon is changed.
     */
    event Upgraded(address indexed implementation);

    /**
     * @dev Sets the address of the initial implementation, and the deployer account as the owner who can upgrade the
     * beacon.
     */
    constructor(address implementation_) {
        _setImplementation(implementation_);
    }

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

    /**
     * @dev Upgrades the beacon to a new implementation.
     *
     * Emits an {Upgraded} event.
     *
     * Requirements:
     *
     * - msg.sender must be the owner of the contract.
     * - `newImplementation` must be a contract.
     */
    function upgradeTo(address newImplementation) public virtual onlyOwner {
        _setImplementation(newImplementation);
        emit Upgraded(newImplementation);
    }

    /**
     * @dev Sets the implementation contract address for this beacon
     *
     * Requirements:
     *
     * - `newImplementation` must be a contract.
     */
    function _setImplementation(address newImplementation) private {
        require(Address.isContract(newImplementation), "UpgradeableBeacon: implementation is not a contract");
        _implementation = newImplementation;
    }
}

File 8 of 13 : ERC1967Upgrade.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (proxy/ERC1967/ERC1967Upgrade.sol)

pragma solidity ^0.8.2;

import "../beacon/IBeacon.sol";
import "../../interfaces/IERC1967.sol";
import "../../interfaces/draft-IERC1822.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._
 */
abstract contract ERC1967Upgrade is IERC1967 {
    // 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 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 _upgradeToAndCallUUPS(address newImplementation, bytes memory data, bool forceCall) internal {
        // Upgrades from old implementations will perform a rollback test. This test requires the new
        // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing
        // this special case will break upgrade paths from old UUPS implementation to new ones.
        if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {
            _setImplementation(newImplementation);
        } else {
            try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {
                require(slot == _IMPLEMENTATION_SLOT, "ERC1967Upgrade: unsupported proxiableUUID");
            } catch {
                revert("ERC1967Upgrade: new implementation is not UUPS");
            }
            _upgradeToAndCall(newImplementation, data, forceCall);
        }
    }

    /**
     * @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 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 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 9 of 13 : Proxy.sol
// 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 {}
}

File 10 of 13 : Address.sol
// 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);
        }
    }
}

File 11 of 13 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)

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

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

File 12 of 13 : StorageSlot.sol
// 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
        }
    }
}

File 13 of 13 : LimitOrderBookBeacon.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.21;

import "@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

contract LimitOrderBookBeacon is Ownable {
    UpgradeableBeacon immutable beacon;

    address public blueprint;

    constructor(address _implementation) {
        beacon = new UpgradeableBeacon(_implementation);
        blueprint = _implementation;
        transferOwnership(tx.origin);
    }

    function update(address _newBlueprint) public onlyOwner {
        beacon.upgradeTo(_newBlueprint);
        blueprint = _newBlueprint;
    }

    function implementation() public view returns (address) {
        return beacon.implementation();
    }
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_implementation","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint24","name":"perpetualId","type":"uint24"},{"indexed":false,"internalType":"address","name":"perpManagerAddress","type":"address"},{"indexed":false,"internalType":"address","name":"limitOrderBookAddress","type":"address"}],"name":"PerpetualLimitOrderBookDeployed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint24","name":"perpetualId","type":"uint24"},{"indexed":false,"internalType":"uint32","name":"gasLimit","type":"uint32"}],"name":"SetCallbackGasLimit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"executor","type":"address"},{"indexed":false,"internalType":"bool","name":"authorized","type":"bool"}],"name":"SetExecutor","type":"event"},{"inputs":[{"internalType":"address","name":"_executor","type":"address"}],"name":"addExecutor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"approvedExecutor","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_perpetualManagerAddr","type":"address"},{"internalType":"uint24","name":"_perpetualId","type":"uint24"}],"name":"deployLimitOrderBookProxy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getBeacon","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getImplementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint24","name":"","type":"uint24"}],"name":"orderBooks","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_executor","type":"address"}],"name":"removeExecutor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60a060405234801561001057600080fd5b50604051611fee380380611fee83398101604081905261002f916100e1565b61003833610084565b80604051610045906100d4565b6001600160a01b039091168152602001604051809103906000f080158015610071573d6000803e3d6000fd5b506001600160a01b031660805250610111565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b610d1a806112d483390190565b6000602082840312156100f357600080fd5b81516001600160a01b038116811461010a57600080fd5b9392505050565b60805161119a61013a6000396000818161017e0152818161035c01526106b2015261119a6000f3fe60806040523480156200001157600080fd5b5060043610620000cd5760003560e01c8063715018a6116200007f578063aaf10f421162000062578063aaf10f4214620001cc578063d770f16614620001d6578063f2fde38b146200020d57600080fd5b8063715018a614620001a35780638da5cb5b14620001ad57600080fd5b80632478842911620000b45780632478842914620001025780632d55804714620001195780632d6b3a6b146200017c57600080fd5b8063074fa70814620000d25780631f5a0bbe14620000eb575b600080fd5b620000e9620000e336600462000946565b62000224565b005b620000e9620000fc36600462000980565b6200044f565b620000e96200011336600462000980565b62000578565b620001526200012a366004620009a7565b60016020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000062000152565b620000e962000696565b60005473ffffffffffffffffffffffffffffffffffffffff1662000152565b62000152620006ae565b620001fc620001e736600462000980565b60026020526000908152604090205460ff1681565b604051901515815260200162000173565b620000e96200021e36600462000980565b62000747565b6200022e62000804565b62ffffff811660009081526001602052604090205473ffffffffffffffffffffffffffffffffffffffff1615620002c6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f6f72646572626f6f6b20616c7265616479206465706c6f79656400000000000060448201526064015b60405180910390fd5b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015262ffffff83166044820152600a60648083019190915282518083039091018152608490910182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f749fb2790000000000000000000000000000000000000000000000000000000017905290516000917f0000000000000000000000000000000000000000000000000000000000000000916200038790620008fc565b62000394929190620009c5565b604051809103906000f080158015620003b1573d6000803e3d6000fd5b5062ffffff831660008181526001602090815260409182902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff868116918217909255835191891682529181019190915292935090917f74fd73207824ecfc332f65fbed1e0b27ae41df0b7ce2b3117a661242f3bc415d910160405180910390a2505050565b6200045962000804565b73ffffffffffffffffffffffffffffffffffffffff811660009081526002602052604090205460ff1615620004eb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f616c726561647920617574686f72697a656400000000000000000000000000006044820152606401620002bd565b73ffffffffffffffffffffffffffffffffffffffff811660008181526002602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660019081179091558251938452908301527f827c394aebf0fcbf2d4f5c0107a0031a3860ec0d5e06756e03aacccfb8d2836e91015b60405180910390a150565b6200058262000804565b73ffffffffffffffffffffffffffffffffffffffff811660009081526002602052604090205460ff1662000613576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f6e6f7420617574686f72697a65640000000000000000000000000000000000006044820152606401620002bd565b73ffffffffffffffffffffffffffffffffffffffff8116600081815260026020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690558051938452908301919091527f827c394aebf0fcbf2d4f5c0107a0031a3860ec0d5e06756e03aacccfb8d2836e91016200056d565b620006a062000804565b620006ac600062000887565b565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200071c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000742919062000a51565b905090565b6200075162000804565b73ffffffffffffffffffffffffffffffffffffffff8116620007f6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401620002bd565b620008018162000887565b50565b60005473ffffffffffffffffffffffffffffffffffffffff163314620006ac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401620002bd565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6106f38062000a7283390190565b73ffffffffffffffffffffffffffffffffffffffff811681146200080157600080fd5b803562ffffff811681146200094157600080fd5b919050565b600080604083850312156200095a57600080fd5b823562000967816200090a565b915062000977602084016200092d565b90509250929050565b6000602082840312156200099357600080fd5b8135620009a0816200090a565b9392505050565b600060208284031215620009ba57600080fd5b620009a0826200092d565b73ffffffffffffffffffffffffffffffffffffffff8316815260006020604081840152835180604085015260005b8181101562000a1157858101830151858201606001528201620009f3565b5060006060828601015260607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f830116850101925050509392505050565b60006020828403121562000a6457600080fd5b8151620009a0816200090a56fe60806040526040516106f33803806106f383398101604081905261002291610420565b61002e82826000610035565b505061054a565b61003e836100f6565b6040516001600160a01b038416907f1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e90600090a260008251118061007f5750805b156100f1576100ef836001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100e991906104e0565b8361027a565b505b505050565b6001600160a01b0381163b6101605760405162461bcd60e51b815260206004820152602560248201527f455243313936373a206e657720626561636f6e206973206e6f74206120636f6e6044820152641d1c9858dd60da1b60648201526084015b60405180910390fd5b6101d4816001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101c591906104e0565b6001600160a01b03163b151590565b6102395760405162461bcd60e51b815260206004820152603060248201527f455243313936373a20626561636f6e20696d706c656d656e746174696f6e206960448201526f1cc81b9bdd08184818dbdb9d1c9858dd60821b6064820152608401610157565b7fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d5080546001600160a01b0319166001600160a01b0392909216919091179055565b606061029f83836040518060600160405280602781526020016106cc602791396102a6565b9392505050565b6060600080856001600160a01b0316856040516102c391906104fb565b600060405180830381855af49150503d80600081146102fe576040519150601f19603f3d011682016040523d82523d6000602084013e610303565b606091505b5090925090506103158683838761031f565b9695505050505050565b6060831561038e578251600003610387576001600160a01b0385163b6103875760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610157565b5081610398565b61039883836103a0565b949350505050565b8151156103b05781518083602001fd5b8060405162461bcd60e51b81526004016101579190610517565b80516001600160a01b03811681146103e157600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b838110156104175781810151838201526020016103ff565b50506000910152565b6000806040838503121561043357600080fd5b61043c836103ca565b60208401519092506001600160401b038082111561045957600080fd5b818501915085601f83011261046d57600080fd5b81518181111561047f5761047f6103e6565b604051601f8201601f19908116603f011681019083821181831017156104a7576104a76103e6565b816040528281528860208487010111156104c057600080fd5b6104d18360208301602088016103fc565b80955050505050509250929050565b6000602082840312156104f257600080fd5b61029f826103ca565b6000825161050d8184602087016103fc565b9190910192915050565b60208152600082518060208401526105368160408501602087016103fc565b601f01601f19169190910160400192915050565b610173806105596000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610029565b6100dc565b565b60006100697fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d505473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff16635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100d79190610100565b905090565b3660008037600080366000845af43d6000803e8080156100fb573d6000f35b3d6000fd5b60006020828403121561011257600080fd5b815173ffffffffffffffffffffffffffffffffffffffff8116811461013657600080fd5b939250505056fea2646970667358221220e54b4bce6ab5151e360729135f5dfa36ab233eed37433fed7f58ae4560cded8b64736f6c63430008150033416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220bbd1baa858292aeaa120d5c34438988d425dc463510cd64ec84ea3bc031b527064736f6c6343000815003360a060405234801561001057600080fd5b50604051610d1a380380610d1a83398101604081905261002f916101dd565b610038336100a6565b80604051610045906101d0565b6001600160a01b039091168152602001604051809103906000f080158015610071573d6000803e3d6000fd5b506001600160a01b03908116608052600180546001600160a01b0319169183169190911790556100a0326100f6565b5061020d565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6100fe610174565b6001600160a01b0381166101685760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b610171816100a6565b50565b6000546001600160a01b031633146101ce5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161015f565b565b6105ef8061072b83390190565b6000602082840312156101ef57600080fd5b81516001600160a01b038116811461020657600080fd5b9392505050565b6080516104fc61022f60003960008181610163015261020b01526104fc6000f3fe608060405234801561001057600080fd5b50600436106100725760003560e01c80638da5cb5b116100505780638da5cb5b146100c5578063c05efa15146100e3578063f2fde38b1461010357600080fd5b80631c1b8772146100775780635c60da1b1461008c578063715018a6146100bd575b600080fd5b61008a610085366004610485565b610116565b005b610094610207565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b61008a61029d565b60005473ffffffffffffffffffffffffffffffffffffffff16610094565b6001546100949073ffffffffffffffffffffffffffffffffffffffff1681565b61008a610111366004610485565b6102b1565b61011e61036d565b6040517f3659cfe600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82811660048301527f00000000000000000000000000000000000000000000000000000000000000001690633659cfe690602401600060405180830381600087803b1580156101a757600080fd5b505af11580156101bb573d6000803e3d6000fd5b5050600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff94909416939093179092555050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610274573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061029891906104a9565b905090565b6102a561036d565b6102af60006103ee565b565b6102b961036d565b73ffffffffffffffffffffffffffffffffffffffff8116610361576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b61036a816103ee565b50565b60005473ffffffffffffffffffffffffffffffffffffffff1633146102af576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610358565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b73ffffffffffffffffffffffffffffffffffffffff8116811461036a57600080fd5b60006020828403121561049757600080fd5b81356104a281610463565b9392505050565b6000602082840312156104bb57600080fd5b81516104a28161046356fea2646970667358221220ab94ffd7fef91a854166f825bb45a67f08311ec01ecb3687637f0d79b590b7dd64736f6c63430008150033608060405234801561001057600080fd5b506040516105ef3803806105ef83398101604081905261002f9161013a565b61003833610047565b61004181610097565b5061016a565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0381163b6101185760405162461bcd60e51b815260206004820152603360248201527f5570677261646561626c65426561636f6e3a20696d706c656d656e746174696f60448201527f6e206973206e6f74206120636f6e747261637400000000000000000000000000606482015260840160405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60006020828403121561014c57600080fd5b81516001600160a01b038116811461016357600080fd5b9392505050565b610476806101796000396000f3fe608060405234801561001057600080fd5b50600436106100675760003560e01c8063715018a611610050578063715018a6146100c45780638da5cb5b146100cc578063f2fde38b146100ea57600080fd5b80633659cfe61461006c5780635c60da1b14610081575b600080fd5b61007f61007a366004610403565b6100fd565b005b60015473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b61007f610152565b60005473ffffffffffffffffffffffffffffffffffffffff1661009b565b61007f6100f8366004610403565b610166565b610105610222565b61010e816102a3565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b61015a610222565b610164600061038e565b565b61016e610222565b73ffffffffffffffffffffffffffffffffffffffff8116610216576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b61021f8161038e565b50565b60005473ffffffffffffffffffffffffffffffffffffffff163314610164576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161020d565b73ffffffffffffffffffffffffffffffffffffffff81163b610347576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603360248201527f5570677261646561626c65426561636f6e3a20696d706c656d656e746174696f60448201527f6e206973206e6f74206120636f6e747261637400000000000000000000000000606482015260840161020d565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561041557600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461043957600080fd5b939250505056fea26469706673582212205df5393a2eb751bea98445255ec645a1523b94f863c88114ad377b869eb9b67964736f6c63430008150033000000000000000000000000edd13fadb2d4d1a845e8083a355cb95db2689564

Deployed Bytecode

0x60806040523480156200001157600080fd5b5060043610620000cd5760003560e01c8063715018a6116200007f578063aaf10f421162000062578063aaf10f4214620001cc578063d770f16614620001d6578063f2fde38b146200020d57600080fd5b8063715018a614620001a35780638da5cb5b14620001ad57600080fd5b80632478842911620000b45780632478842914620001025780632d55804714620001195780632d6b3a6b146200017c57600080fd5b8063074fa70814620000d25780631f5a0bbe14620000eb575b600080fd5b620000e9620000e336600462000946565b62000224565b005b620000e9620000fc36600462000980565b6200044f565b620000e96200011336600462000980565b62000578565b620001526200012a366004620009a7565b60016020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b7f000000000000000000000000ea2179ab15f46b582801f0df391a5828b48b143462000152565b620000e962000696565b60005473ffffffffffffffffffffffffffffffffffffffff1662000152565b62000152620006ae565b620001fc620001e736600462000980565b60026020526000908152604090205460ff1681565b604051901515815260200162000173565b620000e96200021e36600462000980565b62000747565b6200022e62000804565b62ffffff811660009081526001602052604090205473ffffffffffffffffffffffffffffffffffffffff1615620002c6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f6f72646572626f6f6b20616c7265616479206465706c6f79656400000000000060448201526064015b60405180910390fd5b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015262ffffff83166044820152600a60648083019190915282518083039091018152608490910182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f749fb2790000000000000000000000000000000000000000000000000000000017905290516000917f000000000000000000000000ea2179ab15f46b582801f0df391a5828b48b1434916200038790620008fc565b62000394929190620009c5565b604051809103906000f080158015620003b1573d6000803e3d6000fd5b5062ffffff831660008181526001602090815260409182902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff868116918217909255835191891682529181019190915292935090917f74fd73207824ecfc332f65fbed1e0b27ae41df0b7ce2b3117a661242f3bc415d910160405180910390a2505050565b6200045962000804565b73ffffffffffffffffffffffffffffffffffffffff811660009081526002602052604090205460ff1615620004eb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f616c726561647920617574686f72697a656400000000000000000000000000006044820152606401620002bd565b73ffffffffffffffffffffffffffffffffffffffff811660008181526002602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660019081179091558251938452908301527f827c394aebf0fcbf2d4f5c0107a0031a3860ec0d5e06756e03aacccfb8d2836e91015b60405180910390a150565b6200058262000804565b73ffffffffffffffffffffffffffffffffffffffff811660009081526002602052604090205460ff1662000613576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f6e6f7420617574686f72697a65640000000000000000000000000000000000006044820152606401620002bd565b73ffffffffffffffffffffffffffffffffffffffff8116600081815260026020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690558051938452908301919091527f827c394aebf0fcbf2d4f5c0107a0031a3860ec0d5e06756e03aacccfb8d2836e91016200056d565b620006a062000804565b620006ac600062000887565b565b60007f000000000000000000000000ea2179ab15f46b582801f0df391a5828b48b143473ffffffffffffffffffffffffffffffffffffffff16635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200071c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000742919062000a51565b905090565b6200075162000804565b73ffffffffffffffffffffffffffffffffffffffff8116620007f6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401620002bd565b620008018162000887565b50565b60005473ffffffffffffffffffffffffffffffffffffffff163314620006ac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401620002bd565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6106f38062000a7283390190565b73ffffffffffffffffffffffffffffffffffffffff811681146200080157600080fd5b803562ffffff811681146200094157600080fd5b919050565b600080604083850312156200095a57600080fd5b823562000967816200090a565b915062000977602084016200092d565b90509250929050565b6000602082840312156200099357600080fd5b8135620009a0816200090a565b9392505050565b600060208284031215620009ba57600080fd5b620009a0826200092d565b73ffffffffffffffffffffffffffffffffffffffff8316815260006020604081840152835180604085015260005b8181101562000a1157858101830151858201606001528201620009f3565b5060006060828601015260607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f830116850101925050509392505050565b60006020828403121562000a6457600080fd5b8151620009a0816200090a56fe60806040526040516106f33803806106f383398101604081905261002291610420565b61002e82826000610035565b505061054a565b61003e836100f6565b6040516001600160a01b038416907f1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e90600090a260008251118061007f5750805b156100f1576100ef836001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100e991906104e0565b8361027a565b505b505050565b6001600160a01b0381163b6101605760405162461bcd60e51b815260206004820152602560248201527f455243313936373a206e657720626561636f6e206973206e6f74206120636f6e6044820152641d1c9858dd60da1b60648201526084015b60405180910390fd5b6101d4816001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101c591906104e0565b6001600160a01b03163b151590565b6102395760405162461bcd60e51b815260206004820152603060248201527f455243313936373a20626561636f6e20696d706c656d656e746174696f6e206960448201526f1cc81b9bdd08184818dbdb9d1c9858dd60821b6064820152608401610157565b7fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d5080546001600160a01b0319166001600160a01b0392909216919091179055565b606061029f83836040518060600160405280602781526020016106cc602791396102a6565b9392505050565b6060600080856001600160a01b0316856040516102c391906104fb565b600060405180830381855af49150503d80600081146102fe576040519150601f19603f3d011682016040523d82523d6000602084013e610303565b606091505b5090925090506103158683838761031f565b9695505050505050565b6060831561038e578251600003610387576001600160a01b0385163b6103875760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610157565b5081610398565b61039883836103a0565b949350505050565b8151156103b05781518083602001fd5b8060405162461bcd60e51b81526004016101579190610517565b80516001600160a01b03811681146103e157600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b838110156104175781810151838201526020016103ff565b50506000910152565b6000806040838503121561043357600080fd5b61043c836103ca565b60208401519092506001600160401b038082111561045957600080fd5b818501915085601f83011261046d57600080fd5b81518181111561047f5761047f6103e6565b604051601f8201601f19908116603f011681019083821181831017156104a7576104a76103e6565b816040528281528860208487010111156104c057600080fd5b6104d18360208301602088016103fc565b80955050505050509250929050565b6000602082840312156104f257600080fd5b61029f826103ca565b6000825161050d8184602087016103fc565b9190910192915050565b60208152600082518060208401526105368160408501602087016103fc565b601f01601f19169190910160400192915050565b610173806105596000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610029565b6100dc565b565b60006100697fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d505473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff16635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100d79190610100565b905090565b3660008037600080366000845af43d6000803e8080156100fb573d6000f35b3d6000fd5b60006020828403121561011257600080fd5b815173ffffffffffffffffffffffffffffffffffffffff8116811461013657600080fd5b939250505056fea2646970667358221220e54b4bce6ab5151e360729135f5dfa36ab233eed37433fed7f58ae4560cded8b64736f6c63430008150033416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220bbd1baa858292aeaa120d5c34438988d425dc463510cd64ec84ea3bc031b527064736f6c63430008150033

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

000000000000000000000000edd13fadb2d4d1a845e8083a355cb95db2689564

-----Decoded View---------------
Arg [0] : _implementation (address): 0xeDd13fadb2d4D1a845E8083a355CB95DB2689564

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000edd13fadb2d4d1a845e8083a355cb95db2689564


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ 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.