ETH Price: $3,020.42 (+3.17%)

Contract

0x683089CC5a0D026A670286beCE41f4c1F211c3ff

Overview

ETH Balance

Linea Mainnet LogoLinea Mainnet LogoLinea Mainnet Logo0 ETH

ETH Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To
Deploy Proxy77344062024-08-05 15:39:50540 days ago1722872390IN
0x683089CC...1F211c3ff
0 ETH0.000259020.1608
Deploy Proxy77343982024-08-05 15:39:34540 days ago1722872374IN
0x683089CC...1F211c3ff
0 ETH0.000226480.162
Deploy Proxy77343932024-08-05 15:39:24540 days ago1722872364IN
0x683089CC...1F211c3ff
0 ETH0.000259020.1608
Deploy Proxy77193112024-08-05 7:16:38540 days ago1722842198IN
0x683089CC...1F211c3ff
0 ETH0.000242830.17688
Deploy Proxy75577452024-08-01 13:28:41544 days ago1722518921IN
0x683089CC...1F211c3ff
0 ETH0.000083970.06
Deploy Proxy75577402024-08-01 13:28:31544 days ago1722518911IN
0x683089CC...1F211c3ff
0 ETH0.000085370.06
Deploy Proxy75577342024-08-01 13:28:19544 days ago1722518899IN
0x683089CC...1F211c3ff
0 ETH0.000089820.06
Deploy Proxy75577292024-08-01 13:28:09544 days ago1722518889IN
0x683089CC...1F211c3ff
0 ETH0.000091260.06
Deploy Proxy73345652024-07-27 9:28:43549 days ago1722072523IN
0x683089CC...1F211c3ff
0 ETH0.000084850.06
Deploy Proxy71586062024-07-23 7:42:59553 days ago1721720579IN
0x683089CC...1F211c3ff
0 ETH0.000085060.06
Deploy Proxy71585992024-07-23 7:42:45553 days ago1721720565IN
0x683089CC...1F211c3ff
0 ETH0.000086450.06
Deploy Proxy71585952024-07-23 7:42:37553 days ago1721720557IN
0x683089CC...1F211c3ff
0 ETH0.000087850.06
Deploy Proxy71585912024-07-23 7:42:29553 days ago1721720549IN
0x683089CC...1F211c3ff
0 ETH0.000089430.06
Deploy Proxy66005372024-07-10 9:38:06566 days ago1720604286IN
0x683089CC...1F211c3ff
0 ETH0.000084070.06022137
Deploy66005312024-07-10 9:37:54566 days ago1720604274IN
0x683089CC...1F211c3ff
0 ETH0.000037380.06019966

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
77344062024-08-05 15:39:50540 days ago1722872390
0x683089CC...1F211c3ff
0 ETH
77344062024-08-05 15:39:50540 days ago1722872390
0x683089CC...1F211c3ff
0 ETH
77344062024-08-05 15:39:50540 days ago1722872390
0x683089CC...1F211c3ff
 Contract Creation0 ETH
77343982024-08-05 15:39:34540 days ago1722872374
0x683089CC...1F211c3ff
0 ETH
77343982024-08-05 15:39:34540 days ago1722872374
0x683089CC...1F211c3ff
0 ETH
77343982024-08-05 15:39:34540 days ago1722872374
0x683089CC...1F211c3ff
 Contract Creation0 ETH
77343932024-08-05 15:39:24540 days ago1722872364
0x683089CC...1F211c3ff
0 ETH
77343932024-08-05 15:39:24540 days ago1722872364
0x683089CC...1F211c3ff
0 ETH
77343932024-08-05 15:39:24540 days ago1722872364
0x683089CC...1F211c3ff
 Contract Creation0 ETH
77193112024-08-05 7:16:38540 days ago1722842198
0x683089CC...1F211c3ff
0 ETH
77193112024-08-05 7:16:38540 days ago1722842198
0x683089CC...1F211c3ff
0 ETH
77193112024-08-05 7:16:38540 days ago1722842198
0x683089CC...1F211c3ff
 Contract Creation0 ETH
75577452024-08-01 13:28:41544 days ago1722518921
0x683089CC...1F211c3ff
0 ETH
75577452024-08-01 13:28:41544 days ago1722518921
0x683089CC...1F211c3ff
0 ETH
75577452024-08-01 13:28:41544 days ago1722518921
0x683089CC...1F211c3ff
 Contract Creation0 ETH
75577402024-08-01 13:28:31544 days ago1722518911
0x683089CC...1F211c3ff
0 ETH
75577402024-08-01 13:28:31544 days ago1722518911
0x683089CC...1F211c3ff
0 ETH
75577402024-08-01 13:28:31544 days ago1722518911
0x683089CC...1F211c3ff
 Contract Creation0 ETH
75577342024-08-01 13:28:19544 days ago1722518899
0x683089CC...1F211c3ff
0 ETH
75577342024-08-01 13:28:19544 days ago1722518899
0x683089CC...1F211c3ff
0 ETH
75577342024-08-01 13:28:19544 days ago1722518899
0x683089CC...1F211c3ff
 Contract Creation0 ETH
75577292024-08-01 13:28:09544 days ago1722518889
0x683089CC...1F211c3ff
0 ETH
75577292024-08-01 13:28:09544 days ago1722518889
0x683089CC...1F211c3ff
0 ETH
75577292024-08-01 13:28:09544 days ago1722518889
0x683089CC...1F211c3ff
 Contract Creation0 ETH
73345652024-07-27 9:28:43549 days ago1722072523
0x683089CC...1F211c3ff
0 ETH
View All Internal Transactions
Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Create2Deployer

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
Yes with 1 runs

Other Settings:
paris EvmVersion
// SPDX-License-Identifier: MIT
// Further information: https://eips.ethereum.org/EIPS/eip-1014

pragma solidity ^0.8.9;

import "@openzeppelin/contracts/utils/Create2.sol";
import "@openzeppelin/contracts/utils/introspection/ERC1820Implementer.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import {SphereXProtected} from "@spherex-xyz/contracts/src/SphereXProtected.sol";

interface Proxy {
    function upgradeTo(address) external;

    function initialize() external;

    function initialize(bytes memory) external;
}

contract Create2Deployer is Ownable, Pausable {
    /**
     * @dev Deploys a contract using `CREATE2`. The address where the
     * contract will be deployed can be known in advance via {computeAddress}.
     *
     * The bytecode for a contract can be obtained from Solidity with
     * `type(contractName).creationCode`.
     *
     * Requirements:
     * - `bytecode` must not be empty.
     * - `salt` must have not been used for `bytecode` already.
     * - the factory must have a balance of at least `value`.
     * - if `value` is non-zero, `bytecode` must have a `payable` constructor.
     * - `initializeData` must be a valid data to call `initialize` on the new implementation.
     */
    function deployProxy(
        uint256 value,
        bytes32 salt,
        bytes memory code,
        address newImplementation,
        bytes memory initializeData
    ) public whenNotPaused onlyOwner sphereXGuardPublic(13, 0x115d01c4) {
        address proxy = Create2.deploy(value, salt, code);
        Proxy(proxy).upgradeTo(newImplementation);
        Proxy(proxy).initialize(initializeData);
    }

    /**
     * @dev Deploys a contract using `CREATE2`. The address where the
     * contract will be deployed can be known in advance via {computeAddress}.
     *
     * The bytecode for a contract can be obtained from Solidity with
     * `type(contractName).creationCode`.
     *
     * Requirements:
     * - `bytecode` must not be empty.
     * - `salt` must have not been used for `bytecode` already.
     * - the factory must have a balance of at least `value`.
     * - if `value` is non-zero, `bytecode` must have a `payable` constructor.
     */
    function deploy(
        uint256 value,
        bytes32 salt,
        bytes memory code
    ) public whenNotPaused onlyOwner sphereXGuardPublic(11, 0x66cfa057) {
        Create2.deploy(value, salt, code);
    }

    /**
     * @dev Deployment of the {ERC1820Implementer}.
     * Further information: https://eips.ethereum.org/EIPS/eip-1820
     */
    function deployERC1820Implementer(
        uint256 value,
        bytes32 salt
    ) public whenNotPaused onlyOwner sphereXGuardPublic(12, 0x076c37b2) {
        Create2.deploy(value, salt, type(ERC1820Implementer).creationCode);
    }

    /**
     * @dev Returns the address where a contract will be stored if deployed via {deploy}.
     * Any change in the `bytecodeHash` or `salt` will result in a new destination address.
     */
    function computeAddress(bytes32 salt, bytes32 codeHash) public view returns (address) {
        return Create2.computeAddress(salt, codeHash);
    }

    /**
     * @dev Returns the address where a contract will be stored if deployed via {deploy} from a
     * contract located at `deployer`. If `deployer` is this contract's address, returns the
     * same value as {computeAddress}.
     */
    function computeAddressWithDeployer(
        bytes32 salt,
        bytes32 codeHash,
        address deployer
    ) public pure returns (address) {
        return Create2.computeAddress(salt, codeHash, deployer);
    }

    /**
     * @dev Contract can receive ether. However, the only way to transfer this ether is
     * to call the function `killCreate2Deployer`.
     */
    receive() external payable {}

    /**
     * @dev Triggers stopped state.
     * Requirements: The contract must not be paused.
     */
    function pause() public onlyOwner sphereXGuardPublic(15, 0x8456cb59) {
        _pause();
    }

    /**
     * @dev Returns to normal state.
     * Requirements: The contract must be paused.
     */
    function unpause() public onlyOwner sphereXGuardPublic(16, 0x3f4ba83a) {
        _unpause();
    }

    /**
     * @dev Destroys the Create2Deployer contract and transfers all ether to a pre-defined payout address.
     * @notice Using the `CREATE2` EVM opcode always allows to redeploy a new smart contract to a
     * previously seldestructed contract address. However, if a contract creation is attempted,
     * due to either a creation transaction or the `CREATE`/`CREATE2` EVM opcode, and the destination
     * address already has either nonzero nonce, or non-empty code, then the creation throws immediately,
     * with exactly the same behavior as would arise if the first byte in the init code were an invalid opcode.
     * This applies retroactively starting from genesis.
     */
    function killCreate2Deployer(address payable payoutAddress) public onlyOwner sphereXGuardPublic(14, 0x64470454) {
        payoutAddress.transfer(address(this).balance);
        selfdestruct(payoutAddress);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";
import {SphereXProtected} from "@spherex-xyz/contracts/src/SphereXProtected.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, SphereXProtected {
    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 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 sphereXGuardPublic(18, 0x715018a6) {
        _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 sphereXGuardPublic(19, 0xf2fde38b) {
        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 sphereXGuardInternal(17) {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";
import {SphereXProtected} from "@spherex-xyz/contracts/src/SphereXProtected.sol";

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context, SphereXProtected {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        _requireNotPaused();
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        _requirePaused();
        _;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        require(!paused(), "Pausable: paused");
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        require(paused(), "Pausable: not paused");
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused sphereXGuardInternal(20) {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused sphereXGuardInternal(21) {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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;
    }
}

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

pragma solidity ^0.8.0;

/**
 * @dev Helper to make usage of the `CREATE2` EVM opcode easier and safer.
 * `CREATE2` can be used to compute in advance the address where a smart
 * contract will be deployed, which allows for interesting new mechanisms known
 * as 'counterfactual interactions'.
 *
 * See the https://eips.ethereum.org/EIPS/eip-1014#motivation[EIP] for more
 * information.
 */
library Create2 {
    /**
     * @dev Deploys a contract using `CREATE2`. The address where the contract
     * will be deployed can be known in advance via {computeAddress}.
     *
     * The bytecode for a contract can be obtained from Solidity with
     * `type(contractName).creationCode`.
     *
     * Requirements:
     *
     * - `bytecode` must not be empty.
     * - `salt` must have not been used for `bytecode` already.
     * - the factory must have a balance of at least `amount`.
     * - if `amount` is non-zero, `bytecode` must have a `payable` constructor.
     */
    function deploy(
        uint256 amount,
        bytes32 salt,
        bytes memory bytecode
    ) internal returns (address addr) {
        require(address(this).balance >= amount, "Create2: insufficient balance");
        require(bytecode.length != 0, "Create2: bytecode length is zero");
        /// @solidity memory-safe-assembly
        assembly {
            addr := create2(amount, add(bytecode, 0x20), mload(bytecode), salt)
        }
        require(addr != address(0), "Create2: Failed on deploy");
    }

    /**
     * @dev Returns the address where a contract will be stored if deployed via {deploy}. Any change in the
     * `bytecodeHash` or `salt` will result in a new destination address.
     */
    function computeAddress(bytes32 salt, bytes32 bytecodeHash) internal view returns (address) {
        return computeAddress(salt, bytecodeHash, address(this));
    }

    /**
     * @dev Returns the address where a contract will be stored if deployed via {deploy} from a contract located at
     * `deployer`. If `deployer` is this contract's address, returns the same value as {computeAddress}.
     */
    function computeAddress(
        bytes32 salt,
        bytes32 bytecodeHash,
        address deployer
    ) internal pure returns (address addr) {
        /// @solidity memory-safe-assembly
        assembly {
            let ptr := mload(0x40) // Get free memory pointer

            // |                   | ↓ ptr ...  ↓ ptr + 0x0B (start) ...  ↓ ptr + 0x20 ...  ↓ ptr + 0x40 ...   |
            // |-------------------|---------------------------------------------------------------------------|
            // | bytecodeHash      |                                                        CCCCCCCCCCCCC...CC |
            // | salt              |                                      BBBBBBBBBBBBB...BB                   |
            // | deployer          | 000000...0000AAAAAAAAAAAAAAAAAAA...AA                                     |
            // | 0xFF              |            FF                                                             |
            // |-------------------|---------------------------------------------------------------------------|
            // | memory            | 000000...00FFAAAAAAAAAAAAAAAAAAA...AABBBBBBBBBBBBB...BBCCCCCCCCCCCCC...CC |
            // | keccak(start, 85) |            ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ |

            mstore(add(ptr, 0x40), bytecodeHash)
            mstore(add(ptr, 0x20), salt)
            mstore(ptr, deployer) // Right-aligned with 12 preceding garbage bytes
            let start := add(ptr, 0x0b) // The hashed data starts at the final garbage byte which we will set to 0xff
            mstore8(start, 0xff)
            addr := keccak256(start, 85)
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC1820Implementer.sol)

pragma solidity ^0.8.0;

import "./IERC1820Implementer.sol";

/**
 * @dev Implementation of the {IERC1820Implementer} interface.
 *
 * Contracts may inherit from this and call {_registerInterfaceForAddress} to
 * declare their willingness to be implementers.
 * {IERC1820Registry-setInterfaceImplementer} should then be called for the
 * registration to be complete.
 */
contract ERC1820Implementer is IERC1820Implementer {
    bytes32 private constant _ERC1820_ACCEPT_MAGIC = keccak256("ERC1820_ACCEPT_MAGIC");

    mapping(bytes32 => mapping(address => bool)) private _supportedInterfaces;

    /**
     * @dev See {IERC1820Implementer-canImplementInterfaceForAddress}.
     */
    function canImplementInterfaceForAddress(bytes32 interfaceHash, address account)
        public
        view
        virtual
        override
        returns (bytes32)
    {
        return _supportedInterfaces[interfaceHash][account] ? _ERC1820_ACCEPT_MAGIC : bytes32(0x00);
    }

    /**
     * @dev Declares the contract as willing to be an implementer of
     * `interfaceHash` for `account`.
     *
     * See {IERC1820Registry-setInterfaceImplementer} and
     * {IERC1820Registry-interfaceHash}.
     */
    function _registerInterfaceForAddress(bytes32 interfaceHash, address account) internal virtual {
        _supportedInterfaces[interfaceHash][account] = true;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC1820Implementer.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface for an ERC1820 implementer, as defined in the
 * https://eips.ethereum.org/EIPS/eip-1820#interface-implementation-erc1820implementerinterface[EIP].
 * Used by contracts that will be registered as implementers in the
 * {IERC1820Registry}.
 */
interface IERC1820Implementer {
    /**
     * @dev Returns a special value (`ERC1820_ACCEPT_MAGIC`) if this contract
     * implements `interfaceHash` for `account`.
     *
     * See {IERC1820Registry-setInterfaceImplementer}.
     */
    function canImplementInterfaceForAddress(bytes32 interfaceHash, address account) external view returns (bytes32);
}

// SPDX-License-Identifier: UNLICENSED
// (c) SphereX 2023 Terms&Conditions

pragma solidity ^0.8.0;

/**
 * @title Interface for SphereXEngine - definitions of core functionality
 * @author SphereX Technologies ltd
 * @notice This interface is imported by SphereXProtected, so that SphereXProtected can call functions from SphereXEngine
 * @dev Full docs of these functions can be found in SphereXEngine
 */

interface ISphereXEngine {
    function sphereXValidatePre(int256 num, address sender, bytes calldata data) external returns (bytes32[] memory);
    function sphereXValidatePost(
        int256 num,
        uint256 gas,
        bytes32[] calldata valuesBefore,
        bytes32[] calldata valuesAfter
    ) external;
    function sphereXValidateInternalPre(int256 num) external returns (bytes32[] memory);
    function sphereXValidateInternalPost(
        int256 num,
        uint256 gas,
        bytes32[] calldata valuesBefore,
        bytes32[] calldata valuesAfter
    ) external;

    function addAllowedSenderOnChain(address sender) external;

    /**
     * This function is taken as is from OZ IERC165, we don't inherit from OZ
     * to avoid collisions with the customer OZ version.
     *
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

/**
 * @dev this struct is used to reduce the stack usage of the modifiers.
 */
struct ModifierLocals {
    bytes32[] storageSlots;
    bytes32[] valuesBefore;
    uint256 gas;
}

File 9 of 10 : SphereXProtected.sol
// SPDX-License-Identifier: UNLICENSED
// (c) SphereX 2023 Terms&Conditions

pragma solidity ^0.8.0;

import {SphereXProtectedBase} from "./SphereXProtectedBase.sol";

/**
 * @title SphereX base Customer contract template
 * @dev notice this is an abstract
 */
abstract contract SphereXProtected is SphereXProtectedBase(tx.origin, address(0), address(0)) {}

// SPDX-License-Identifier: UNLICENSED
// (c) SphereX 2023 Terms&Conditions

pragma solidity ^0.8.0;

import {ISphereXEngine, ModifierLocals} from "./ISphereXEngine.sol";

/**
 * @title SphereX base Customer contract template
 */
abstract contract SphereXProtectedBase {
    /**
     * @dev we would like to avoid occupying storage slots
     * @dev to easily incorporate with existing contracts
     */
    bytes32 private constant SPHEREX_ADMIN_STORAGE_SLOT = bytes32(uint256(keccak256("eip1967.spherex.spherex")) - 1);
    bytes32 private constant SPHEREX_PENDING_ADMIN_STORAGE_SLOT =
        bytes32(uint256(keccak256("eip1967.spherex.pending")) - 1);
    bytes32 private constant SPHEREX_OPERATOR_STORAGE_SLOT = bytes32(uint256(keccak256("eip1967.spherex.operator")) - 1);
    bytes32 private constant SPHEREX_ENGINE_STORAGE_SLOT =
        bytes32(uint256(keccak256("eip1967.spherex.spherex_engine")) - 1);

    event ChangedSpherexOperator(address oldSphereXAdmin, address newSphereXAdmin);
    event ChangedSpherexEngineAddress(address oldEngineAddress, address newEngineAddress);
    event SpherexAdminTransferStarted(address currentAdmin, address pendingAdmin);
    event SpherexAdminTransferCompleted(address oldAdmin, address newAdmin);

    /**
     * @dev used when the client doesn't use a proxy
     * @notice constructor visibility is required to support all compiler versions
     */
    constructor(address admin, address operator, address engine) {
        __SphereXProtectedBase_init(admin, operator, engine);
    }

    /**
     * @dev used when the client uses a proxy - should be called by the inhereter initialization
     */
    function __SphereXProtectedBase_init(address admin, address operator, address engine) internal virtual {
        _setAddress(SPHEREX_ADMIN_STORAGE_SLOT, admin);
        emit SpherexAdminTransferCompleted(address(0), admin);

        _setAddress(SPHEREX_OPERATOR_STORAGE_SLOT, operator);
        emit ChangedSpherexOperator(address(0), operator);

        _checkSphereXEngine(engine);
        _setAddress(SPHEREX_ENGINE_STORAGE_SLOT, engine);
        emit ChangedSpherexEngineAddress(address(0), engine);
    }

    // ============ Helper functions ============

    function _sphereXEngine() private view returns (ISphereXEngine) {
        return ISphereXEngine(_getAddress(SPHEREX_ENGINE_STORAGE_SLOT));
    }

    /**
     * Stores a new address in an arbitrary slot
     * @param slot where to store the address
     * @param newAddress address to store in given slot
     */
    function _setAddress(bytes32 slot, address newAddress) internal {
        // solhint-disable-next-line no-inline-assembly
        // slither-disable-next-line assembly
        assembly {
            sstore(slot, newAddress)
        }
    }

    /**
     * Returns an address from an arbitrary slot.
     * @param slot to read an address from
     */
    function _getAddress(bytes32 slot) internal view returns (address addr) {
        // solhint-disable-next-line no-inline-assembly
        // slither-disable-next-line assembly
        assembly {
            addr := sload(slot)
        }
    }

    // ============ Local modifiers ============

    modifier onlySphereXAdmin() {
        require(msg.sender == _getAddress(SPHEREX_ADMIN_STORAGE_SLOT), "SphereX error: admin required");
        _;
    }

    modifier spherexOnlyOperator() {
        require(msg.sender == _getAddress(SPHEREX_OPERATOR_STORAGE_SLOT), "SphereX error: operator required");
        _;
    }

    modifier returnsIfNotActivated() {
        if (address(_sphereXEngine()) == address(0)) {
            return;
        }

        _;
    }

    // ============ Management ============

    /**
     * Returns the currently pending admin address, the one that can call acceptSphereXAdminRole to become the admin.
     * @dev Could not use OZ Ownable2Step because the client's contract might use it.
     */
    function pendingSphereXAdmin() public view returns (address) {
        return _getAddress(SPHEREX_PENDING_ADMIN_STORAGE_SLOT);
    }

    /**
     * Returns the current admin address, the one that can call acceptSphereXAdminRole to become the admin.
     * @dev Could not use OZ Ownable2Step because the client's contract might use it.
     */
    function sphereXAdmin() public view returns (address) {
        return _getAddress(SPHEREX_ADMIN_STORAGE_SLOT);
    }

    /**
     * Returns the current operator address.
     */
    function sphereXOperator() public view returns (address) {
        return _getAddress(SPHEREX_OPERATOR_STORAGE_SLOT);
    }

    /**
     * Returns the current engine address.
     */
    function sphereXEngine() public view returns (address) {
        return _getAddress(SPHEREX_ENGINE_STORAGE_SLOT);
    }

    /**
     * Setting the address of the next admin. this address will have to accept the role to become the new admin.
     * @dev Could not use OZ Ownable2Step because the client's contract might use it.
     */
    function transferSphereXAdminRole(address newAdmin) public virtual onlySphereXAdmin {
        _setAddress(SPHEREX_PENDING_ADMIN_STORAGE_SLOT, newAdmin);
        emit SpherexAdminTransferStarted(sphereXAdmin(), newAdmin);
    }

    /**
     * Accepting the admin role and completing the transfer.
     * @dev Could not use OZ Ownable2Step because the client's contract might use it.
     */
    function acceptSphereXAdminRole() public virtual {
        require(pendingSphereXAdmin() == msg.sender, "SphereX error: not the pending account");
        address oldAdmin = sphereXAdmin();
        _setAddress(SPHEREX_ADMIN_STORAGE_SLOT, msg.sender);
        _setAddress(SPHEREX_PENDING_ADMIN_STORAGE_SLOT, address(0));
        emit SpherexAdminTransferCompleted(oldAdmin, msg.sender);
    }

    /**
     *
     * @param newSphereXOperator new address of the new operator account
     */
    function changeSphereXOperator(address newSphereXOperator) external onlySphereXAdmin {
        address oldSphereXOperator = _getAddress(SPHEREX_OPERATOR_STORAGE_SLOT);
        _setAddress(SPHEREX_OPERATOR_STORAGE_SLOT, newSphereXOperator);
        emit ChangedSpherexOperator(oldSphereXOperator, newSphereXOperator);
    }

    /**
     * Checks the given address implements ISphereXEngine or is address(0)
     * @param newSphereXEngine new address of the spherex engine
     */
    function _checkSphereXEngine(address newSphereXEngine) private view {
        require(
            newSphereXEngine == address(0)
                || ISphereXEngine(newSphereXEngine).supportsInterface(type(ISphereXEngine).interfaceId),
            "SphereX error: not a SphereXEngine"
        );
    }

    /**
     *
     * @param newSphereXEngine new address of the spherex engine
     * @dev this is also used to actually enable the defense
     * (because as long is this address is 0, the protection is disabled).
     */
    function changeSphereXEngine(address newSphereXEngine) external spherexOnlyOperator {
        _checkSphereXEngine(newSphereXEngine);
        address oldEngine = _getAddress(SPHEREX_ENGINE_STORAGE_SLOT);
        _setAddress(SPHEREX_ENGINE_STORAGE_SLOT, newSphereXEngine);
        emit ChangedSpherexEngineAddress(oldEngine, newSphereXEngine);
    }
    // ============ Engine interaction ============

    function _addAllowedSenderOnChain(address newSender) internal {
        ISphereXEngine engine = _sphereXEngine();
        if (address(engine) != address(0)) {
            engine.addAllowedSenderOnChain(newSender);
        }
    }

    // ============ Hooks ============

    /**
     * @dev internal function for engine communication. We use it to reduce contract size.
     *  Should be called before the code of a function.
     * @param num function identifier
     * @param isExternalCall set to true if this was called externally
     *  or a 'public' function from another address
     */
    function _sphereXValidatePre(int256 num, bool isExternalCall)
        private
        returnsIfNotActivated
        returns (ModifierLocals memory locals)
    {
        ISphereXEngine sphereXEngine = _sphereXEngine();
        if (isExternalCall) {
            locals.storageSlots = sphereXEngine.sphereXValidatePre(num, msg.sender, msg.data);
        } else {
            locals.storageSlots = sphereXEngine.sphereXValidateInternalPre(num);
        }
        locals.valuesBefore = _readStorage(locals.storageSlots);
        locals.gas = gasleft();
        return locals;
    }

    /**
     * @dev internal function for engine communication. We use it to reduce contract size.
     *  Should be called after the code of a function.
     * @param num function identifier
     * @param isExternalCall set to true if this was called externally
     *  or a 'public' function from another address
     */
    function _sphereXValidatePost(int256 num, bool isExternalCall, ModifierLocals memory locals)
        private
        returnsIfNotActivated
    {
        uint256 gas = locals.gas - gasleft();

        ISphereXEngine sphereXEngine = _sphereXEngine();

        bytes32[] memory valuesAfter;
        valuesAfter = _readStorage(locals.storageSlots);

        if (isExternalCall) {
            sphereXEngine.sphereXValidatePost(num, gas, locals.valuesBefore, valuesAfter);
        } else {
            sphereXEngine.sphereXValidateInternalPost(num, gas, locals.valuesBefore, valuesAfter);
        }
    }

    /**
     * @dev internal function for engine communication. We use it to reduce contract size.
     *  Should be called before the code of a function.
     * @param num function identifier
     * @return locals ModifierLocals
     */
    function _sphereXValidateInternalPre(int256 num)
        internal
        returnsIfNotActivated
        returns (ModifierLocals memory locals)
    {
        locals.storageSlots = _sphereXEngine().sphereXValidateInternalPre(num);
        locals.valuesBefore = _readStorage(locals.storageSlots);
        locals.gas = gasleft();
        return locals;
    }

    /**
     * @dev internal function for engine communication. We use it to reduce contract size.
     *  Should be called after the code of a function.
     * @param num function identifier
     * @param locals ModifierLocals
     */
    function _sphereXValidateInternalPost(int256 num, ModifierLocals memory locals) internal returnsIfNotActivated {
        bytes32[] memory valuesAfter;
        valuesAfter = _readStorage(locals.storageSlots);
        _sphereXEngine().sphereXValidateInternalPost(num, locals.gas - gasleft(), locals.valuesBefore, valuesAfter);
    }

    /**
     *  @dev Modifier to be incorporated in all internal protected non-view functions
     */
    modifier sphereXGuardInternal(int256 num) {
        ModifierLocals memory locals = _sphereXValidateInternalPre(num);
        _;
        _sphereXValidateInternalPost(-num, locals);
    }

    /**
     *  @dev Modifier to be incorporated in all external protected non-view functions
     */
    modifier sphereXGuardExternal(int256 num) {
        ModifierLocals memory locals = _sphereXValidatePre(num, true);
        _;
        _sphereXValidatePost(-num, true, locals);
    }

    /**
     *  @dev Modifier to be incorporated in all public protected non-view functions
     */
    modifier sphereXGuardPublic(int256 num, bytes4 selector) {
        ModifierLocals memory locals = _sphereXValidatePre(num, msg.sig == selector);
        _;
        _sphereXValidatePost(-num, msg.sig == selector, locals);
    }

    // ============ Internal Storage logic ============

    /**
     * Internal function that reads values from given storage slots and returns them
     * @param storageSlots list of storage slots to read
     * @return list of values read from the various storage slots
     */
    function _readStorage(bytes32[] memory storageSlots) internal view returns (bytes32[] memory) {
        uint256 arrayLength = storageSlots.length;
        bytes32[] memory values = new bytes32[](arrayLength);
        // create the return array data

        for (uint256 i = 0; i < arrayLength; i++) {
            bytes32 slot = storageSlots[i];
            bytes32 temp_value;
            // solhint-disable-next-line no-inline-assembly
            // slither-disable-next-line assembly
            assembly {
                temp_value := sload(slot)
            }

            values[i] = temp_value;
        }
        return values;
    }
}

Settings
{
  "viaIR": true,
  "optimizer": {
    "enabled": true,
    "runs": 1,
    "details": {
      "peephole": true,
      "yulDetails": {
        "stackAllocation": true,
        "optimizerSteps": "dhfoD[xarrscLMcCTU]uljmul"
      }
    }
  },
  "evmVersion": "paris",
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldEngineAddress","type":"address"},{"indexed":false,"internalType":"address","name":"newEngineAddress","type":"address"}],"name":"ChangedSpherexEngineAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldSphereXAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newSphereXAdmin","type":"address"}],"name":"ChangedSpherexOperator","type":"event"},{"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":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"SpherexAdminTransferCompleted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"currentAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"pendingAdmin","type":"address"}],"name":"SpherexAdminTransferStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"acceptSphereXAdminRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newSphereXEngine","type":"address"}],"name":"changeSphereXEngine","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newSphereXOperator","type":"address"}],"name":"changeSphereXOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"bytes32","name":"codeHash","type":"bytes32"}],"name":"computeAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"bytes32","name":"codeHash","type":"bytes32"},{"internalType":"address","name":"deployer","type":"address"}],"name":"computeAddressWithDeployer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"bytes","name":"code","type":"bytes"}],"name":"deploy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes32","name":"salt","type":"bytes32"}],"name":"deployERC1820Implementer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"bytes","name":"code","type":"bytes"},{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"initializeData","type":"bytes"}],"name":"deployProxy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"payoutAddress","type":"address"}],"name":"killCreate2Deployer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingSphereXAdmin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sphereXAdmin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"sphereXEngine","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"sphereXOperator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newAdmin","type":"address"}],"name":"transferSphereXAdminRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040523462000024576200001462000029565b604051611d55908162000a6a8239f35b600080fd5b620000336200006a565b565b90565b906200004b620000356200006692151590565b82549060ff60a01b9060a01b60ff60a01b1990921691161790565b9055565b6200007462000081565b6200003360008062000038565b6200008b620000bd565b620000333362000222565b620000a662000035620000359290565b6001600160a01b031690565b620000359062000096565b62000033620000cd6000620000b2565b6200003390803262000329565b6200003562000035620000359290565b634e487b7160e01b600052601160045260246000fd5b600160ff1b8114620001125760000390565b620000ea565b6200003390620001496200012d6011620000da565b620001436200013c82620007bb565b93620001c2565b62000100565b62000961565b6200003590620000a6565b6200003590546200014f565b6200003590620000a6906001600160a01b031682565b620000359062000166565b62000035906200017c565b90620001a662000035620000669262000187565b82546001600160a01b0319166001600160a01b03919091161790565b620001f0620001e9620001d660006200015a565b620001e384600062000192565b62000187565b9162000187565b907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e06200021c60405190565b600090a3565b620000339062000118565b6200003590620000da565b620000da565b919082039182116200011257565b62000035620002386200027f7fca334bf49ef20e9cbff039feda3bc1c2a853aff17b1b5187e4aa1380ec55829d6200022d565b6200028b6001620000da565b906200023e565b6200029d90620000a6565b9052565b91602062000033929493620002bb81604081019762000292565b019062000292565b62000035620002386200027f7fadf90d75f0f2d657d5a22fa0f6e4dabb83c4598b77158eb4119cb38f1d8644636200022d565b62000035620002386200027f7f1777adabd324f814e2b0e28f6edf876dce01d7d66358c9acfe87b1b5f38338d66200022d565b7f2ac55ae7ba47db34b5334622acafeb34a65daf143b47019273185d64c73a35a5620003ea7ff33499cccaa0611882086224cc48cd82ef54b66a4d2edf4ed67108dd516896d594936200038384620003806200024c565b55565b7f67ebaebcd2ca5a91a404e898110f221747e8d15567f2388a34794aab151cf3e6620003ca620003b46000620000b2565b95620003bf60405190565b9182918883620002a1565b0390a1620003dc8162000380620002c3565b6040519182918583620002a1565b0390a1620003f882620004f8565b620004078262000380620002f6565b6200041f6200041560405190565b92839283620002a1565b0390a1565b634e487b7160e01b600052604160045260246000fd5b90601f01601f191681019081106001600160401b038211176200045c57604052565b62000424565b8015155b036200002457565b90505190620000338262000462565b90602082820312620000245762000035916200046e565b6040513d6000823e3d90fd5b15620004a857565b60405162461bcd60e51b815260206004820152602260248201527f53706865726558206572726f723a206e6f7420612053706865726558456e67696044820152616e6560f01b6064820152608490fd5b6200050e620005086000620000b2565b620000a6565b6200051982620000a6565b1480156200052e575b620000339150620004a0565b50620001e36200053e9162000187565b60206200054a60405190565b6301ffc9a760e01b81526329f20dd560e11b600482015291829060249082905afa8015620005bc57620000339160009162000587575b5062000522565b620005ad915060203d8111620005b4575b620005a481836200043a565b8101906200047d565b3862000580565b503d62000598565b62000494565b9062000033620005d160405190565b92836200043a565b620000356060620005c2565b620005ef620005d9565b606080825260208201526000604082015290565b62000035620005e5565b9190826200061e620001e3620007d0565b6200063962000632620005086000620000b2565b91620000a6565b146200064c576200003592935062000720565b5050565b6001600160401b0381116200045c5760051b60200190565b8062000466565b90505190620000338262000668565b9092919262000697620006918262000650565b620005c2565b93602085838152019160051b8301928184116200002457915b838310620006be5750505050565b60208091620006ce84866200066f565b815201920191620006b0565b9080601f830112156200002457815162000035926020016200067e565b90602082820312620000245781516001600160401b0381116200002457620000359201620006da565b90600062000761819262000737620001e3620007d0565b906200074260405190565b9485938492839190633e88494360e01b83526004830190815260200190565b03925af18015620005bc57620007849160009162000795575b50808352620009f3565b6020820152620000355a6040830152565b620007b4913d8091833e620007ab81836200043a565b810190620006f7565b386200077a565b6200003590620007ca62000603565b6200060d565b62000035620001e3620007e2620002f6565b5490565b90620007f5620001e3620007d0565b6200080962000632620005086000620000b2565b146200064c576200003391620008c4565b60009103126200002457565b90620008496200084262000838845190565b8084529260200190565b9260200190565b9060005b8181106200085b5750505090565b9091926200087a620008736001928651815260200190565b9460200190565b9291016200084d565b92620008a36200003595936200089c86620008b5959052565b6020860152565b60806040850152608084019062000826565b91606081840391015262000826565b620008d08251620009f3565b91620008df620001e3620007d0565b6020620008f9620008f1604085015190565b5a906200023e565b92015191813b15620000245760008094620009326200091760405190565b9788968795869463027313cd60e11b86526004860162000883565b03925af18015620005bc57620009455750565b620000339060006200095881836200043a565b8101906200081a565b906200003391620007e6565b906200097d620006918362000650565b918252565b369037565b906200003362000997836200096d565b60208194620009a9601f199162000650565b01910162000982565b6000198114620001125760010190565b634e487b7160e01b600052603260045260246000fd5b8051821015620009ed5760209160051b010190565b620009c2565b90620009fd825190565b9162000a098362000987565b9162000a1e62000a1a6000620000da565b9490565b935b8481101562000a62578062000a5662000a4662000a4262000a5c9487620009d8565b5190565b5462000a538388620009d8565b52565b620009b2565b62000a20565b509250509056fe6080604052600436101561001b575b361561001957600080fd5b005b60003560e01c8063076c37b21461015b578063115d01c4146101565780633c231166146101515780633f4ba83a1461014c578063481286e6146101475780634c6c848f146101425780634ee8f8581461013d57806356299481146101385780635c975abb14610133578063644704541461012e57806366cfa05714610129578063715018a6146101245780638426b9681461011f5780638456cb591461011a5780638da5cb5b1461011557806399e80f3b146101105780639aa9019e1461010b578063daba7ef714610106578063e7e5db4f146101015763f2fde38b0361000e576105b6565b61059b565b610583565b610568565b61054d565b610532565b61051a565b610502565b6104ea565b6104d1565b61047b565b61044e565b610432565b6103ea565b6103d2565b6103a2565b61038a565b610363565b61031f565b6101a3565b805b0361016957565b600080fd5b9050359061017b82610160565b565b9190604083820312610169578060206101996101a0938661016e565b940161016e565b90565b34610169576101bc6101b636600461017d565b9061188d565b604051005b0390f35b634e487b7160e01b600052604160045260246000fd5b90601f01601f191681019081106001600160401b038211176101fc57604052565b6101c5565b9061017b61020e60405190565b92836101db565b6001600160401b0381116101fc57602090601f01601f19160190565b0190565b90826000939282370152565b9092919261025661025182610215565b610201565b9182948284528282011161016957602061017b930190610235565b9080601f83011215610169578160206101a093359101610241565b6001600160a01b031690565b6101628161028c565b9050359061017b82610298565b91909160a081840312610169576102c5838261016e565b926102d3816020840161016e565b9260408301356001600160401b03811161016957826102f3918501610271565b9261030183606083016102a1565b9260808201356001600160401b038111610169576101a09201610271565b34610169576101bc6103323660046102ae565b939290926115e2565b600091031261016957565b61034f9061028c565b9052565b60208101929161017b9190610346565b346101695761037336600461033b565b6101c161037e610a39565b60405191829182610353565b346101695761039a36600461033b565b6101bc611a22565b34610169576101c161037e6103b836600461017d565b90611897565b90602082820312610169576101a0916102a1565b34610169576101bc6103e53660046103be565b610d13565b34610169576101bc6103fd3660046103be565b610c54565b9091606082840312610169576101a061041b848461016e565b93604061042b826020870161016e565b94016102a1565b34610169576101c161037e610448366004610402565b916118cb565b346101695761045e36600461033b565b6101c1610469610923565b60405191829182901515815260200190565b346101695761048b3660046103be565b611b56565b91606083830312610169576104a5828461016e565b926104b3836020830161016e565b9260408201356001600160401b038111610169576101a09201610271565b34610169576101bc6104e4366004610490565b916117fd565b34610169576104fa36600461033b565b6101bc6106cb565b346101695761051236600461033b565b6101bc610b8e565b346101695761052a36600461033b565b6101bc61192d565b346101695761054236600461033b565b6101c161037e6105d8565b346101695761055d36600461033b565b6101c161037e6109c5565b346101695761057836600461033b565b6101c161037e610987565b34610169576101bc6105963660046103be565b610b2a565b34610169576105ab36600461033b565b6101c161037e6109ff565b34610169576101bc6105c93660046103be565b610825565b6101a0905461028c565b6101a060006105ce565b6105ea610727565b61017b610650565b6101a06101a06101a09290565b6001600160e01b03191690565b61061f6106196101a09290565b60e01b90565b6105ff565b634e487b7160e01b600052601160045260246000fd5b600160ff1b811461064b5760000390565b610624565b61017b61065d60126105f2565b61066d61061f63715018a661060c565b6106826000356001600160e01b0319166105ff565b1461069e61069082846110df565b926106996106b9565b61063a565b61128e565b61028c6101a06101a09290565b6101a0906106a3565b61017b6106c660006106b0565b610903565b61017b6105e2565b156106da57565b60405162461bcd60e51b815280610723600482016020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b0390fd5b61017b6107326105d8565b6107496107433361028c565b61028c565b9161028c565b146106d3565b61017b9061075b610727565b61017b9061076960136105f2565b61069e61077c61061f63f2fde38b61060c565b6107916000356001600160e01b0319166105ff565b14916106996107a084836110df565b94610801565b156107ad57565b60405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608490fd5b61017b906106c661081561073e60006106b0565b61081e8361028c565b14156107a6565b61017b9061074f565b61017b9061085161083f60116105f2565b61069961084b82611316565b936108ac565b61138d565b6101a09061028c906001600160a01b031682565b6101a090610856565b6101a09061086a565b9061088c6101a06108a892610873565b82546001600160a01b0319166001600160a01b03919091161790565b9055565b6108d26108cc6108bc60006105ce565b6108c784600061087c565b610873565b91610873565b907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e06108fd60405190565b600090a3565b61017b9061082e565b6101a09060a01c60ff1690565b6101a0905461090c565b6101a06000610919565b6101a0906105f2565b6105f2565b9190820391821161064b57565b6101a06109366109777f3a517dd736309b905c692160a21b5439bdc56db1dc77d6982b66d44814e3fa9761092d565b61098160016105f2565b9061093b565b6101a0610992610948565b5490565b6101a06109366109777fca334bf49ef20e9cbff039feda3bc1c2a853aff17b1b5187e4aa1380ec55829d61092d565b6101a0610992610996565b6101a06109366109777fadf90d75f0f2d657d5a22fa0f6e4dabb83c4598b77158eb4119cb38f1d86446361092d565b6101a06109926109d0565b6101a06109366109777f1777adabd324f814e2b0e28f6edf876dce01d7d66358c9acfe87b1b5f38338d661092d565b6101a0610992610a0a565b15610a4b57565b60405162461bcd60e51b815260206004820152601d60248201527f53706865726558206572726f723a2061646d696e2072657175697265640000006044820152606490fd5b61017b90610ab4610aa561073e610992610996565b610aae3361028c565b14610a44565b610ad7565b91602061017b929493610ad0816040810197610346565b0190610346565b7f5778f1547abbbb86090a43c32aec38334b31df4beeb6f8f3fa063f593b53a52690610b0881610b05610948565b55565b610b106109c5565b610b25610b1c60405190565b92839283610ab9565b0390a1565b61017b90610a90565b15610b3a57565b60405162461bcd60e51b815260206004820152602660248201527f53706865726558206572726f723a206e6f74207468652070656e64696e67206160448201526518d8dbdd5b9d60d21b6064820152608490fd5b610bab610b99610987565b610ba56107433361028c565b14610b33565b7f67ebaebcd2ca5a91a404e898110f221747e8d15567f2388a34794aab151cf3e6610b25610bd76109c5565b610be333610b05610996565b610bf8610bee610948565b6108a860006106b0565b604051918291339083610ab9565b61017b90610c1b610aa561073e610992610996565b7f2ac55ae7ba47db34b5334622acafeb34a65daf143b47019273185d64c73a35a590610c486109926109d0565b610b1082610b056109d0565b61017b90610c06565b15610c6457565b60405162461bcd60e51b815280610723600482016020808252818101527f53706865726558206572726f723a206f70657261746f72207265717569726564604082015260600190565b61017b90610cd1610cc261073e6109926109d0565b610ccb3361028c565b14610c5d565b7ff33499cccaa0611882086224cc48cd82ef54b66a4d2edf4ed67108dd516896d590610cfc81610dc1565b610d07610992610a0a565b610b1082610b05610a0a565b61017b90610cad565b801515610162565b9050519061017b82610d1c565b90602082820312610169576101a091610d24565b61034f906105ff565b60208101929161017b9190610d45565b6040513d6000823e3d90fd5b15610d7157565b60405162461bcd60e51b815260206004820152602260248201527f53706865726558206572726f723a206e6f7420612053706865726558456e67696044820152616e6560f01b6064820152608490fd5b610dce61073e60006106b0565b610dd78261028c565b148015610de9575b61017b9150610d6a565b506108c7610df691610873565b6020610e0160405190565b9182906301ffc9a760e01b82528180610e246329f20dd560e11b60048301610d4e565b03915afa8015610e6e5761017b91600091610e40575b50610ddf565b610e61915060203d8111610e67575b610e5981836101db565b810190610d31565b38610e3a565b503d610e4f565b610d5e565b6101a06060610201565b610e85610e73565b606080825260208201526000604082015290565b6101a0610e7d565b92919083610eb06108c76110f1565b610ec061074361073e60006106b0565b14610ed0576101a0939450610fd8565b505050565b6001600160401b0381116101fc5760051b60200190565b9050519061017b82610160565b90929192610f0961025182610ed5565b93602085838152019160051b83019281841161016957915b838310610f2e5750505050565b60208091610f3c8486610eec565b815201920191610f21565b9080601f830112156101695781516101a092602001610ef9565b906020828203126101695781516001600160401b038111610169576101a09201610f47565b9190610fa481610f9d816102319560209181520190565b8095610235565b601f01601f191690565b610fcb6101a09593610fc1836060959052565b6020830190610346565b8160408201520191610f86565b91600091908291610fe76110f1565b91831461107657610ffa61102492610873565b9061100460405190565b9485938492839190634492e52d60e11b8352833691339060048601610fae565b03925af1908115610e6e57600091611055575b5081525b6110458151611411565b60208201526101a05a6040830152565b611070913d8091833e61106881836101db565b810190610f61565b38611037565b6110826110ab92610873565b9061108c60405190565b9485938492839190633e88494360e01b83526004830190815260200190565b03925af1908115610e6e576000916110c6575b50815261103b565b6110d9913d8091833e61106881836101db565b386110be565b906101a0916110ec610e99565b610ea1565b6101a06108c7610992610a0a565b919061110c6108c76110f1565b61111c61074361073e60006106b0565b14610ed05761017b926111bb565b9061114a611143611139845190565b8084529260200190565b9260200190565b9060005b81811061115b5750505090565b9091926111786111716001928651815260200190565b9460200190565b92910161114e565b9261119c6101a09593611195866111ad959052565b6020860152565b60806040850152608084019061112a565b91606081840391015261112a565b90916111d26111cb604083015190565b5a9061093b565b9060206111dd6110f1565b6111e78351611411565b9515611256576111f690610873565b91015191813b15610169576000809461122c61121160405190565b97889687958694631e17b28d60e31b5b865260048601611180565b03925af18015610e6e5761123e575b50565b61017b90600061124e81836101db565b81019061033b565b61125f90610873565b91015191813b15610169576000809461122c61127a60405190565b9788968795869463027313cd60e11b611221565b9061017b92916110ff565b9190826112a76108c76110f1565b6112b761074361073e60006106b0565b146112c7576101a09293506112cb565b5050565b9060006112de81926110826108c76110f1565b03925af18015610e6e57611045916000916112fd575b50808352611411565b611310913d8091833e61106881836101db565b386112f4565b6101a090611322610e99565b611299565b906113336108c76110f1565b61134361074361073e60006106b0565b146112c75761017b916113568251611411565b916113626108c76110f1565b60206113726111cb604085015190565b92015191813b15610169576000809461122c61127a60405190565b9061017b91611327565b906113a461025183610ed5565b918252565b369037565b9061017b6113bb83611397565b602081946113cb601f1991610ed5565b0191016113a9565b600019811461064b5760010190565b634e487b7160e01b600052603260045260246000fd5b805182101561140c5760209160051b010190565b6113e2565b9061141a825190565b91611424836113ae565b9161143661143260006105f2565b9490565b935b84811015611470578061146661145861145461146b94876113f8565b5190565b5461146383886113f8565b52565b6113d3565b611438565b5092505090565b9061017b9493929161148761162e565b9061017b94939291611497610727565b929161069961017b9561069e93946114af600d6105f2565b936114c061061f63115d01c461060c565b6114d56000356001600160e01b0319166105ff565b14966114e188876110df565b98611545565b60005b8381106114fa5750506000910152565b81810151838201526020016114ea565b61152b610fa46020936102319361151f815190565b80835293849260200190565b958691016114e7565b9060206101a092818152019061150a565b611556926108c7926108c792611729565b90813b156101695760006115869161156d60405190565b928391829190631b2ce7f360e11b835260048301610353565b038183865af18015610e6e576115cc575b50803b156101695761122c6000929183926115b160405190565b948593849283919063439fab9160e01b835260048301611534565b6115dc90600061124e81836101db565b38611597565b9061017b94939291611477565b156115f657565b60405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606490fd5b61017b61164061163c610923565b1590565b6115ef565b1561164c57565b60405162461bcd60e51b815260206004820152601d60248201527f437265617465323a20696e73756666696369656e742062616c616e63650000006044820152606490fd5b1561169857565b60405162461bcd60e51b815280610723600482016020808252818101527f437265617465323a2062797465636f6465206c656e677468206973207a65726f604082015260600190565b156116e857565b60405162461bcd60e51b8152602060048201526019602482015278437265617465323a204661696c6564206f6e206465706c6f7960381b6044820152606490fd5b91909161174b61173830610873565b829031611744565b9190565b1015611645565b61176a611756835190565b61176361174060006105f2565b1415611691565b60208251920190f59061017b8261178761074361073e60006106b0565b14156116e1565b9061017b929161179c61162e565b9061017b92916117aa610727565b9061069e61017b936106996117bf600b6105f2565b916117d061061f6366cfa05761060c565b6117e56000356001600160e01b0319166105ff565b14946117f186856110df565b969061123b9291611729565b9061017b929161178e565b9061017b9161181561162e565b9061017b91611822610727565b61017b9161069e611833600c6105f2565b61069961184661061f63076c37b261060c565b61185b6000356001600160e01b0319166105ff565b149361186785846110df565b9561123b916101c49161187c60208401610201565b92808452611b5c6020850139611729565b9061017b91611808565b906101a0916101a0916118a930610873565b915b90605592600b92604051926040840152602083015281520160ff81532090565b906101a092916118ab565b6118de610727565b61017b61017b6118ee600f6105f2565b6118fe61061f638456cb5961060c565b6119136000356001600160e01b0319166105ff565b1461069e61192182846110df565b9261069961017b6119c3565b61017b6118d6565b61193d61162e565b61017b61017b61194d60146105f2565b61085161195982611316565b9161069961198d565b906119726101a06108a892151590565b82549060ff60a01b9060a01b60ff60a01b1990921691161790565b61199960016000611962565b7f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610b253361037e565b61017b611935565b6119d3610727565b61017b61017b6119e360106105f2565b6119f361061f633f4ba83a61060c565b611a086000356001600160e01b0319166105ff565b1461069e611a1682846110df565b9261069961017b611a87565b61017b6119cb565b611a32611ad2565b61017b61017b611a4260156105f2565b610851611a4e82611316565b91610699611a5d600080611962565b7f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa610b253361037e565b61017b611a2a565b15611a9657565b60405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606490fd5b61017b611add610923565b611a8f565b611aea610727565b611b23611af7600e6105f2565b611b0761061f636447045461060c565b611b1c6000356001600160e01b0319166105ff565b14906110df565b506000808080611b3285610873565b611b3b30610873565b3190828215611b4d575bf115610e6e57ff5b506108fc611b45565b611ae256fe608060405234610018576040516101a6908161001e8239f35b600080fdfe6080604052600436101561001257600080fd5b60003560e01c63249cb3fa0361003057610095565b805b0361003057565b600080fd5b9050359061004282610027565b565b6001600160a01b031690565b90565b61002981610044565b9050359061004282610053565b9190604083820312610030578060206100856100509386610035565b940161005c565b90815260200190565b34610030576100bd6100b16100ab366004610069565b9061011e565b6040519182918261008c565b0390f35b905b600052602052604060002090565b61005090610044906001600160a01b031682565b610050906100d1565b610050906100e5565b906100c3906100ee565b60ff1690565b6100509054610101565b6100506100506100509290565b61013a916101306101359260006100c1565b6100f7565b610107565b6000901561016757507fa2ef4600d742022d532d4747cb3547474667d6f13804902513b2ec01c848f4b490565b6100509061011156fea26469706673582212206d8d879cd85d53de1003742be02a5416a3f96cc1386f84c22183a3e90bcd0fc764736f6c63430008140033a2646970667358221220bfadde7009f13ccc442888f52085c8bc7216e0f1ee065bb73bdae8a70c41342a64736f6c63430008140033

Deployed Bytecode

0x6080604052600436101561001b575b361561001957600080fd5b005b60003560e01c8063076c37b21461015b578063115d01c4146101565780633c231166146101515780633f4ba83a1461014c578063481286e6146101475780634c6c848f146101425780634ee8f8581461013d57806356299481146101385780635c975abb14610133578063644704541461012e57806366cfa05714610129578063715018a6146101245780638426b9681461011f5780638456cb591461011a5780638da5cb5b1461011557806399e80f3b146101105780639aa9019e1461010b578063daba7ef714610106578063e7e5db4f146101015763f2fde38b0361000e576105b6565b61059b565b610583565b610568565b61054d565b610532565b61051a565b610502565b6104ea565b6104d1565b61047b565b61044e565b610432565b6103ea565b6103d2565b6103a2565b61038a565b610363565b61031f565b6101a3565b805b0361016957565b600080fd5b9050359061017b82610160565b565b9190604083820312610169578060206101996101a0938661016e565b940161016e565b90565b34610169576101bc6101b636600461017d565b9061188d565b604051005b0390f35b634e487b7160e01b600052604160045260246000fd5b90601f01601f191681019081106001600160401b038211176101fc57604052565b6101c5565b9061017b61020e60405190565b92836101db565b6001600160401b0381116101fc57602090601f01601f19160190565b0190565b90826000939282370152565b9092919261025661025182610215565b610201565b9182948284528282011161016957602061017b930190610235565b9080601f83011215610169578160206101a093359101610241565b6001600160a01b031690565b6101628161028c565b9050359061017b82610298565b91909160a081840312610169576102c5838261016e565b926102d3816020840161016e565b9260408301356001600160401b03811161016957826102f3918501610271565b9261030183606083016102a1565b9260808201356001600160401b038111610169576101a09201610271565b34610169576101bc6103323660046102ae565b939290926115e2565b600091031261016957565b61034f9061028c565b9052565b60208101929161017b9190610346565b346101695761037336600461033b565b6101c161037e610a39565b60405191829182610353565b346101695761039a36600461033b565b6101bc611a22565b34610169576101c161037e6103b836600461017d565b90611897565b90602082820312610169576101a0916102a1565b34610169576101bc6103e53660046103be565b610d13565b34610169576101bc6103fd3660046103be565b610c54565b9091606082840312610169576101a061041b848461016e565b93604061042b826020870161016e565b94016102a1565b34610169576101c161037e610448366004610402565b916118cb565b346101695761045e36600461033b565b6101c1610469610923565b60405191829182901515815260200190565b346101695761048b3660046103be565b611b56565b91606083830312610169576104a5828461016e565b926104b3836020830161016e565b9260408201356001600160401b038111610169576101a09201610271565b34610169576101bc6104e4366004610490565b916117fd565b34610169576104fa36600461033b565b6101bc6106cb565b346101695761051236600461033b565b6101bc610b8e565b346101695761052a36600461033b565b6101bc61192d565b346101695761054236600461033b565b6101c161037e6105d8565b346101695761055d36600461033b565b6101c161037e6109c5565b346101695761057836600461033b565b6101c161037e610987565b34610169576101bc6105963660046103be565b610b2a565b34610169576105ab36600461033b565b6101c161037e6109ff565b34610169576101bc6105c93660046103be565b610825565b6101a0905461028c565b6101a060006105ce565b6105ea610727565b61017b610650565b6101a06101a06101a09290565b6001600160e01b03191690565b61061f6106196101a09290565b60e01b90565b6105ff565b634e487b7160e01b600052601160045260246000fd5b600160ff1b811461064b5760000390565b610624565b61017b61065d60126105f2565b61066d61061f63715018a661060c565b6106826000356001600160e01b0319166105ff565b1461069e61069082846110df565b926106996106b9565b61063a565b61128e565b61028c6101a06101a09290565b6101a0906106a3565b61017b6106c660006106b0565b610903565b61017b6105e2565b156106da57565b60405162461bcd60e51b815280610723600482016020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b0390fd5b61017b6107326105d8565b6107496107433361028c565b61028c565b9161028c565b146106d3565b61017b9061075b610727565b61017b9061076960136105f2565b61069e61077c61061f63f2fde38b61060c565b6107916000356001600160e01b0319166105ff565b14916106996107a084836110df565b94610801565b156107ad57565b60405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608490fd5b61017b906106c661081561073e60006106b0565b61081e8361028c565b14156107a6565b61017b9061074f565b61017b9061085161083f60116105f2565b61069961084b82611316565b936108ac565b61138d565b6101a09061028c906001600160a01b031682565b6101a090610856565b6101a09061086a565b9061088c6101a06108a892610873565b82546001600160a01b0319166001600160a01b03919091161790565b9055565b6108d26108cc6108bc60006105ce565b6108c784600061087c565b610873565b91610873565b907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e06108fd60405190565b600090a3565b61017b9061082e565b6101a09060a01c60ff1690565b6101a0905461090c565b6101a06000610919565b6101a0906105f2565b6105f2565b9190820391821161064b57565b6101a06109366109777f3a517dd736309b905c692160a21b5439bdc56db1dc77d6982b66d44814e3fa9761092d565b61098160016105f2565b9061093b565b6101a0610992610948565b5490565b6101a06109366109777fca334bf49ef20e9cbff039feda3bc1c2a853aff17b1b5187e4aa1380ec55829d61092d565b6101a0610992610996565b6101a06109366109777fadf90d75f0f2d657d5a22fa0f6e4dabb83c4598b77158eb4119cb38f1d86446361092d565b6101a06109926109d0565b6101a06109366109777f1777adabd324f814e2b0e28f6edf876dce01d7d66358c9acfe87b1b5f38338d661092d565b6101a0610992610a0a565b15610a4b57565b60405162461bcd60e51b815260206004820152601d60248201527f53706865726558206572726f723a2061646d696e2072657175697265640000006044820152606490fd5b61017b90610ab4610aa561073e610992610996565b610aae3361028c565b14610a44565b610ad7565b91602061017b929493610ad0816040810197610346565b0190610346565b7f5778f1547abbbb86090a43c32aec38334b31df4beeb6f8f3fa063f593b53a52690610b0881610b05610948565b55565b610b106109c5565b610b25610b1c60405190565b92839283610ab9565b0390a1565b61017b90610a90565b15610b3a57565b60405162461bcd60e51b815260206004820152602660248201527f53706865726558206572726f723a206e6f74207468652070656e64696e67206160448201526518d8dbdd5b9d60d21b6064820152608490fd5b610bab610b99610987565b610ba56107433361028c565b14610b33565b7f67ebaebcd2ca5a91a404e898110f221747e8d15567f2388a34794aab151cf3e6610b25610bd76109c5565b610be333610b05610996565b610bf8610bee610948565b6108a860006106b0565b604051918291339083610ab9565b61017b90610c1b610aa561073e610992610996565b7f2ac55ae7ba47db34b5334622acafeb34a65daf143b47019273185d64c73a35a590610c486109926109d0565b610b1082610b056109d0565b61017b90610c06565b15610c6457565b60405162461bcd60e51b815280610723600482016020808252818101527f53706865726558206572726f723a206f70657261746f72207265717569726564604082015260600190565b61017b90610cd1610cc261073e6109926109d0565b610ccb3361028c565b14610c5d565b7ff33499cccaa0611882086224cc48cd82ef54b66a4d2edf4ed67108dd516896d590610cfc81610dc1565b610d07610992610a0a565b610b1082610b05610a0a565b61017b90610cad565b801515610162565b9050519061017b82610d1c565b90602082820312610169576101a091610d24565b61034f906105ff565b60208101929161017b9190610d45565b6040513d6000823e3d90fd5b15610d7157565b60405162461bcd60e51b815260206004820152602260248201527f53706865726558206572726f723a206e6f7420612053706865726558456e67696044820152616e6560f01b6064820152608490fd5b610dce61073e60006106b0565b610dd78261028c565b148015610de9575b61017b9150610d6a565b506108c7610df691610873565b6020610e0160405190565b9182906301ffc9a760e01b82528180610e246329f20dd560e11b60048301610d4e565b03915afa8015610e6e5761017b91600091610e40575b50610ddf565b610e61915060203d8111610e67575b610e5981836101db565b810190610d31565b38610e3a565b503d610e4f565b610d5e565b6101a06060610201565b610e85610e73565b606080825260208201526000604082015290565b6101a0610e7d565b92919083610eb06108c76110f1565b610ec061074361073e60006106b0565b14610ed0576101a0939450610fd8565b505050565b6001600160401b0381116101fc5760051b60200190565b9050519061017b82610160565b90929192610f0961025182610ed5565b93602085838152019160051b83019281841161016957915b838310610f2e5750505050565b60208091610f3c8486610eec565b815201920191610f21565b9080601f830112156101695781516101a092602001610ef9565b906020828203126101695781516001600160401b038111610169576101a09201610f47565b9190610fa481610f9d816102319560209181520190565b8095610235565b601f01601f191690565b610fcb6101a09593610fc1836060959052565b6020830190610346565b8160408201520191610f86565b91600091908291610fe76110f1565b91831461107657610ffa61102492610873565b9061100460405190565b9485938492839190634492e52d60e11b8352833691339060048601610fae565b03925af1908115610e6e57600091611055575b5081525b6110458151611411565b60208201526101a05a6040830152565b611070913d8091833e61106881836101db565b810190610f61565b38611037565b6110826110ab92610873565b9061108c60405190565b9485938492839190633e88494360e01b83526004830190815260200190565b03925af1908115610e6e576000916110c6575b50815261103b565b6110d9913d8091833e61106881836101db565b386110be565b906101a0916110ec610e99565b610ea1565b6101a06108c7610992610a0a565b919061110c6108c76110f1565b61111c61074361073e60006106b0565b14610ed05761017b926111bb565b9061114a611143611139845190565b8084529260200190565b9260200190565b9060005b81811061115b5750505090565b9091926111786111716001928651815260200190565b9460200190565b92910161114e565b9261119c6101a09593611195866111ad959052565b6020860152565b60806040850152608084019061112a565b91606081840391015261112a565b90916111d26111cb604083015190565b5a9061093b565b9060206111dd6110f1565b6111e78351611411565b9515611256576111f690610873565b91015191813b15610169576000809461122c61121160405190565b97889687958694631e17b28d60e31b5b865260048601611180565b03925af18015610e6e5761123e575b50565b61017b90600061124e81836101db565b81019061033b565b61125f90610873565b91015191813b15610169576000809461122c61127a60405190565b9788968795869463027313cd60e11b611221565b9061017b92916110ff565b9190826112a76108c76110f1565b6112b761074361073e60006106b0565b146112c7576101a09293506112cb565b5050565b9060006112de81926110826108c76110f1565b03925af18015610e6e57611045916000916112fd575b50808352611411565b611310913d8091833e61106881836101db565b386112f4565b6101a090611322610e99565b611299565b906113336108c76110f1565b61134361074361073e60006106b0565b146112c75761017b916113568251611411565b916113626108c76110f1565b60206113726111cb604085015190565b92015191813b15610169576000809461122c61127a60405190565b9061017b91611327565b906113a461025183610ed5565b918252565b369037565b9061017b6113bb83611397565b602081946113cb601f1991610ed5565b0191016113a9565b600019811461064b5760010190565b634e487b7160e01b600052603260045260246000fd5b805182101561140c5760209160051b010190565b6113e2565b9061141a825190565b91611424836113ae565b9161143661143260006105f2565b9490565b935b84811015611470578061146661145861145461146b94876113f8565b5190565b5461146383886113f8565b52565b6113d3565b611438565b5092505090565b9061017b9493929161148761162e565b9061017b94939291611497610727565b929161069961017b9561069e93946114af600d6105f2565b936114c061061f63115d01c461060c565b6114d56000356001600160e01b0319166105ff565b14966114e188876110df565b98611545565b60005b8381106114fa5750506000910152565b81810151838201526020016114ea565b61152b610fa46020936102319361151f815190565b80835293849260200190565b958691016114e7565b9060206101a092818152019061150a565b611556926108c7926108c792611729565b90813b156101695760006115869161156d60405190565b928391829190631b2ce7f360e11b835260048301610353565b038183865af18015610e6e576115cc575b50803b156101695761122c6000929183926115b160405190565b948593849283919063439fab9160e01b835260048301611534565b6115dc90600061124e81836101db565b38611597565b9061017b94939291611477565b156115f657565b60405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606490fd5b61017b61164061163c610923565b1590565b6115ef565b1561164c57565b60405162461bcd60e51b815260206004820152601d60248201527f437265617465323a20696e73756666696369656e742062616c616e63650000006044820152606490fd5b1561169857565b60405162461bcd60e51b815280610723600482016020808252818101527f437265617465323a2062797465636f6465206c656e677468206973207a65726f604082015260600190565b156116e857565b60405162461bcd60e51b8152602060048201526019602482015278437265617465323a204661696c6564206f6e206465706c6f7960381b6044820152606490fd5b91909161174b61173830610873565b829031611744565b9190565b1015611645565b61176a611756835190565b61176361174060006105f2565b1415611691565b60208251920190f59061017b8261178761074361073e60006106b0565b14156116e1565b9061017b929161179c61162e565b9061017b92916117aa610727565b9061069e61017b936106996117bf600b6105f2565b916117d061061f6366cfa05761060c565b6117e56000356001600160e01b0319166105ff565b14946117f186856110df565b969061123b9291611729565b9061017b929161178e565b9061017b9161181561162e565b9061017b91611822610727565b61017b9161069e611833600c6105f2565b61069961184661061f63076c37b261060c565b61185b6000356001600160e01b0319166105ff565b149361186785846110df565b9561123b916101c49161187c60208401610201565b92808452611b5c6020850139611729565b9061017b91611808565b906101a0916101a0916118a930610873565b915b90605592600b92604051926040840152602083015281520160ff81532090565b906101a092916118ab565b6118de610727565b61017b61017b6118ee600f6105f2565b6118fe61061f638456cb5961060c565b6119136000356001600160e01b0319166105ff565b1461069e61192182846110df565b9261069961017b6119c3565b61017b6118d6565b61193d61162e565b61017b61017b61194d60146105f2565b61085161195982611316565b9161069961198d565b906119726101a06108a892151590565b82549060ff60a01b9060a01b60ff60a01b1990921691161790565b61199960016000611962565b7f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610b253361037e565b61017b611935565b6119d3610727565b61017b61017b6119e360106105f2565b6119f361061f633f4ba83a61060c565b611a086000356001600160e01b0319166105ff565b1461069e611a1682846110df565b9261069961017b611a87565b61017b6119cb565b611a32611ad2565b61017b61017b611a4260156105f2565b610851611a4e82611316565b91610699611a5d600080611962565b7f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa610b253361037e565b61017b611a2a565b15611a9657565b60405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606490fd5b61017b611add610923565b611a8f565b611aea610727565b611b23611af7600e6105f2565b611b0761061f636447045461060c565b611b1c6000356001600160e01b0319166105ff565b14906110df565b506000808080611b3285610873565b611b3b30610873565b3190828215611b4d575bf115610e6e57ff5b506108fc611b45565b611ae256fe608060405234610018576040516101a6908161001e8239f35b600080fdfe6080604052600436101561001257600080fd5b60003560e01c63249cb3fa0361003057610095565b805b0361003057565b600080fd5b9050359061004282610027565b565b6001600160a01b031690565b90565b61002981610044565b9050359061004282610053565b9190604083820312610030578060206100856100509386610035565b940161005c565b90815260200190565b34610030576100bd6100b16100ab366004610069565b9061011e565b6040519182918261008c565b0390f35b905b600052602052604060002090565b61005090610044906001600160a01b031682565b610050906100d1565b610050906100e5565b906100c3906100ee565b60ff1690565b6100509054610101565b6100506100506100509290565b61013a916101306101359260006100c1565b6100f7565b610107565b6000901561016757507fa2ef4600d742022d532d4747cb3547474667d6f13804902513b2ec01c848f4b490565b6100509061011156fea26469706673582212206d8d879cd85d53de1003742be02a5416a3f96cc1386f84c22183a3e90bcd0fc764736f6c63430008140033a2646970667358221220bfadde7009f13ccc442888f52085c8bc7216e0f1ee065bb73bdae8a70c41342a64736f6c63430008140033

Block Transaction Gas Used Reward
view all blocks sequenced

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
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.