APE Price: $0.66 (-8.43%)

Contract

0x35cdf8569cBcBd6719Ec861b0487c3C217082ddF

Overview

APE Balance

Apechain LogoApechain LogoApechain Logo0 APE

APE Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Initialize16202112024-10-25 1:36:38122 days ago1729820198IN
0x35cdf856...217082ddF
0 APE0.0017799825.42069

Parent Transaction Hash Block From To
View All Internal Transactions

Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
FactoryUpgradeGate

Compiler Version
v0.8.25+commit.b61c2a91

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
File 1 of 8 : FactoryUpgradeGate.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;

import {IFactoryUpgradeGate} from "./interfaces/IFactoryUpgradeGate.sol";
import { Ownable2StepUpgradeable } from "./utils/ownable/Ownable2StepUpgradeable.sol";
import { FactoryUpgradeGateStorageV1 } from "./FactoryUpgradeGateStorageV1.sol";

/// @notice This contract handles gating allowed upgrades for Freee drops contracts
contract FactoryUpgradeGate is IFactoryUpgradeGate, Ownable2StepUpgradeable, FactoryUpgradeGateStorageV1 {
    /// @notice Private mapping of valid upgrade paths
    mapping(address => mapping(address => bool)) private _validUpgradePaths;

    /// @notice Event emitted when upgrade gate is emitted
    event UpgradeGateSetup();

    /// @notice Emitted when an upgrade path is added / registered
    event UpgradePathRegistered(address newImpl, address oldImpl);

    /// @notice Emitted when an upgrade path is removed
    event UpgradePathRemoved(address newImpl, address oldImpl);

    /// @notice Error for when not called from admin
    error Access_OnlyOwner();

    constructor() {}

    /// @notice Default owner initializer. Allows for shared deterministic addresses.
    /// @param _initialOwner initial owner for the contract
    function initialize(address _initialOwner) external initializer {
        __Ownable_init(_initialOwner);
        emit UpgradeGateSetup();
    }

    /// @notice Ensures the given upgrade path is valid and does not overwrite existing storage slots
    /// @param _newImpl The proposed implementation address
    /// @param _currentImpl The current implementation address
    function isValidUpgradePath(address _newImpl, address _currentImpl) external view returns (bool) {
        return _validUpgradePaths[_newImpl][_currentImpl];
    }

    /// @notice Registers a new safe upgrade path for an implementation
    /// @param _newImpl The new implementation
    /// @param _supportedPrevImpls Safe implementations that can upgrade to this new implementation
    function registerNewUpgradePath(address _newImpl, address[] calldata _supportedPrevImpls) external onlyOwner {
        for (uint256 i = 0; i < _supportedPrevImpls.length; i++) {
            _validUpgradePaths[_newImpl][_supportedPrevImpls[i]] = true;
            emit UpgradePathRegistered(_newImpl, _supportedPrevImpls[i]);
        }
    }

    /// @notice Unregisters an upgrade path, in case of emergency
    /// @param _newImpl the newer implementation
    /// @param _prevImpl the older implementation
    function unregisterUpgradePath(address _newImpl, address _prevImpl) external onlyOwner {
        _validUpgradePaths[_newImpl][_prevImpl] = false;
        emit UpgradePathRemoved(_newImpl, _prevImpl);
    }
}

File 2 of 8 : IFactoryUpgradeGate.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;

interface IFactoryUpgradeGate {
  function isValidUpgradePath(address _newImpl, address _currentImpl) external returns (bool);

  function registerNewUpgradePath(address _newImpl, address[] calldata _supportedPrevImpls) external;

  function unregisterUpgradePath(address _newImpl, address _prevImpl) external;
}

File 3 of 8 : Ownable2StepUpgradeable.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;

import { IOwnable2StepUpgradeable } from "./IOwnable2StepUpgradeable.sol";
import { IOwnable2StepStorageV1 } from "./IOwnable2StepStorageV1.sol";
import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";

/// @title Ownable
/// @author Rohan Kulkarni / Iain Nash
/// @notice Modified from OpenZeppelin Contracts v4.7.3 (access/OwnableUpgradeable.sol)
/// - Uses custom errors declared in IOwnable
/// - Adds optional two-step ownership transfer (`safeTransferOwnership` + `acceptOwnership`)
abstract contract Ownable2StepUpgradeable is IOwnable2StepUpgradeable, IOwnable2StepStorageV1, Initializable {
    ///                                                          ///
    ///                            STORAGE                       ///
    ///                                                          ///

    /// @dev Modifier to check if the address argument is the zero/burn address
    modifier notZeroAddress(address check) {
        if (check == address(0)) {
            revert OWNER_CANNOT_BE_ZERO_ADDRESS();
        }
        _;
    }

    ///                                                          ///
    ///                           MODIFIERS                      ///
    ///                                                          ///

    /// @dev Ensures the caller is the owner
    modifier onlyOwner() {
        if (msg.sender != _owner) {
            revert ONLY_OWNER();
        }
        _;
    }

    /// @dev Ensures the caller is the pending owner
    modifier onlyPendingOwner() {
        if (msg.sender != _pendingOwner) {
            revert ONLY_PENDING_OWNER();
        }
        _;
    }

    ///                                                          ///
    ///                           FUNCTIONS                      ///
    ///                                                          ///

    /// @dev Initializes contract ownership
    /// @param _initialOwner The initial owner address
    function __Ownable_init(address _initialOwner) internal notZeroAddress(_initialOwner) onlyInitializing {
        _owner = _initialOwner;

        emit OwnerUpdated(address(0), _initialOwner);
    }

    /// @notice The address of the owner
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /// @notice The address of the pending owner
    function pendingOwner() public view returns (address) {
        return _pendingOwner;
    }

    /// @notice Forces an ownership transfer from the last owner
    /// @param _newOwner The new owner address
    function transferOwnership(address _newOwner) public notZeroAddress(_newOwner) onlyOwner {
        _transferOwnership(_newOwner);
    }

    /// @notice Forces an ownership transfer from any sender
    /// @param _newOwner New owner to transfer contract to
    /// @dev Ensure is called only from trusted internal code, no access control checks.
    function _transferOwnership(address _newOwner) internal {
        emit OwnerUpdated(_owner, _newOwner);

        _owner = _newOwner;

        if (_pendingOwner != address(0)) {
            delete _pendingOwner;
        }
    }

    /// @notice Initiates a two-step ownership transfer
    /// @param _newOwner The new owner address
    function safeTransferOwnership(address _newOwner) public notZeroAddress(_newOwner) onlyOwner {
        _pendingOwner = _newOwner;

        emit OwnerPending(_owner, _newOwner);
    }

    /// @notice Resign ownership of contract
    /// @dev only callably by the owner, dangerous call.
    function resignOwnership() public onlyOwner {
        _transferOwnership(address(0));
    }

    /// @notice Accepts an ownership transfer
    function acceptOwnership() public onlyPendingOwner {
        emit OwnerUpdated(_owner, msg.sender);

        _transferOwnership(msg.sender);
    }

    /// @notice Cancels a pending ownership transfer
    function cancelOwnershipTransfer() public onlyOwner {
        emit OwnerCanceled(_owner, _pendingOwner);

        delete _pendingOwner;
    }
}

File 4 of 8 : FactoryUpgradeGateStorageV1.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;

abstract contract FactoryUpgradeGateStorageV1 {
    mapping(address => mapping(address => bool)) public isAllowedUpgrade;

    uint256[50] private __gap;
}

File 5 of 8 : IOwnable2StepUpgradeable.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;

/// @title IOwnable2StepUpgradeable
/// @author Rohan Kulkarni
/// @notice The external Ownable events, errors, and functions
interface IOwnable2StepUpgradeable {
    ///                                                          ///
    ///                            EVENTS                        ///
    ///                                                          ///

    /// @notice Emitted when ownership has been updated
    /// @param prevOwner The previous owner address
    /// @param newOwner The new owner address
    event OwnerUpdated(address indexed prevOwner, address indexed newOwner);

    /// @notice Emitted when an ownership transfer is pending
    /// @param owner The current owner address
    /// @param pendingOwner The pending new owner address
    event OwnerPending(address indexed owner, address indexed pendingOwner);

    /// @notice Emitted when a pending ownership transfer has been canceled
    /// @param owner The current owner address
    /// @param canceledOwner The canceled owner address
    event OwnerCanceled(address indexed owner, address indexed canceledOwner);

    ///                                                          ///
    ///                            ERRORS                        ///
    ///                                                          ///

    /// @dev Reverts if an unauthorized user calls an owner function
    error ONLY_OWNER();

    /// @dev Reverts if an unauthorized user calls a pending owner function
    error ONLY_PENDING_OWNER();

    /// @dev Owner cannot be the zero/burn address
    error OWNER_CANNOT_BE_ZERO_ADDRESS();

    ///                                                          ///
    ///                           FUNCTIONS                      ///
    ///                                                          ///

    /// @notice The address of the owner
    function owner() external view returns (address);

    /// @notice The address of the pending owner
    function pendingOwner() external view returns (address);

    /// @notice Forces an ownership transfer
    /// @param newOwner The new owner address
    function transferOwnership(address newOwner) external;

    /// @notice Initiates a two-step ownership transfer
    /// @param newOwner The new owner address
    function safeTransferOwnership(address newOwner) external;

    /// @notice Accepts an ownership transfer
    function acceptOwnership() external;

    /// @notice Cancels a pending ownership transfer
    function cancelOwnershipTransfer() external;
}

File 6 of 8 : IOwnable2StepStorageV1.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;

abstract contract IOwnable2StepStorageV1 {
    /// @dev The address of the owner
    address internal _owner;

    /// @dev The address of the pending owner
    address internal _pendingOwner;

    /// @dev storage gap
    uint256[50] private __gap;
}

File 7 of 8 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)

pragma solidity ^0.8.2;

import "../../utils/AddressUpgradeable.sol";

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
 * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
 * case an upgrade adds a module that needs to be initialized.
 *
 * For example:
 *
 * [.hljs-theme-light.nopadding]
 * ```solidity
 * contract MyToken is ERC20Upgradeable {
 *     function initialize() initializer public {
 *         __ERC20_init("MyToken", "MTK");
 *     }
 * }
 *
 * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
 *     function initializeV2() reinitializer(2) public {
 *         __ERC20Permit_init("MyToken");
 *     }
 * }
 * ```
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 *
 * [CAUTION]
 * ====
 * Avoid leaving a contract uninitialized.
 *
 * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
 * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
 * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() {
 *     _disableInitializers();
 * }
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     * @custom:oz-retyped-from bool
     */
    uint8 private _initialized;

    /**
     * @dev Indicates that the contract is in the process of being initialized.
     */
    bool private _initializing;

    /**
     * @dev Triggered when the contract has been initialized or reinitialized.
     */
    event Initialized(uint8 version);

    /**
     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
     * `onlyInitializing` functions can be used to initialize parent contracts.
     *
     * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a
     * constructor.
     *
     * Emits an {Initialized} event.
     */
    modifier initializer() {
        bool isTopLevelCall = !_initializing;
        require(
            (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),
            "Initializable: contract is already initialized"
        );
        _initialized = 1;
        if (isTopLevelCall) {
            _initializing = true;
        }
        _;
        if (isTopLevelCall) {
            _initializing = false;
            emit Initialized(1);
        }
    }

    /**
     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
     * used to initialize parent contracts.
     *
     * A reinitializer may be used after the original initialization step. This is essential to configure modules that
     * are added through upgrades and that require initialization.
     *
     * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`
     * cannot be nested. If one is invoked in the context of another, execution will revert.
     *
     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
     * a contract, executing them in the right order is up to the developer or operator.
     *
     * WARNING: setting the version to 255 will prevent any future reinitialization.
     *
     * Emits an {Initialized} event.
     */
    modifier reinitializer(uint8 version) {
        require(!_initializing && _initialized < version, "Initializable: contract is already initialized");
        _initialized = version;
        _initializing = true;
        _;
        _initializing = false;
        emit Initialized(version);
    }

    /**
     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
     * {initializer} and {reinitializer} modifiers, directly or indirectly.
     */
    modifier onlyInitializing() {
        require(_initializing, "Initializable: contract is not initializing");
        _;
    }

    /**
     * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
     * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
     * to any version. It is recommended to use this to lock implementation contracts that are designed to be called
     * through proxies.
     *
     * Emits an {Initialized} event the first time it is successfully executed.
     */
    function _disableInitializers() internal virtual {
        require(!_initializing, "Initializable: contract is initializing");
        if (_initialized != type(uint8).max) {
            _initialized = type(uint8).max;
            emit Initialized(type(uint8).max);
        }
    }

    /**
     * @dev Returns the highest version that has been initialized. See {reinitializer}.
     */
    function _getInitializedVersion() internal view returns (uint8) {
        return _initialized;
    }

    /**
     * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.
     */
    function _isInitializing() internal view returns (bool) {
        return _initializing;
    }
}

File 8 of 8 : AddressUpgradeable.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 AddressUpgradeable {
    /**
     * @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);
        }
    }
}

Settings
{
  "remappings": [
    "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "erc721a-upgradeable/=lib/ERC721A-Upgradeable/contracts/",
    "forge-std/=lib/forge-std/src/",
    "ERC721A-Upgradeable/=lib/ERC721A-Upgradeable/contracts/",
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
    "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "openzeppelin/=lib/openzeppelin-contracts/contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "paris",
  "viaIR": true,
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"Access_OnlyOwner","type":"error"},{"inputs":[],"name":"ONLY_OWNER","type":"error"},{"inputs":[],"name":"ONLY_PENDING_OWNER","type":"error"},{"inputs":[],"name":"OWNER_CANNOT_BE_ZERO_ADDRESS","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"canceledOwner","type":"address"}],"name":"OwnerCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"pendingOwner","type":"address"}],"name":"OwnerPending","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"prevOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerUpdated","type":"event"},{"anonymous":false,"inputs":[],"name":"UpgradeGateSetup","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newImpl","type":"address"},{"indexed":false,"internalType":"address","name":"oldImpl","type":"address"}],"name":"UpgradePathRegistered","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newImpl","type":"address"},{"indexed":false,"internalType":"address","name":"oldImpl","type":"address"}],"name":"UpgradePathRemoved","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"cancelOwnershipTransfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_initialOwner","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"isAllowedUpgrade","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_newImpl","type":"address"},{"internalType":"address","name":"_currentImpl","type":"address"}],"name":"isValidUpgradePath","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_newImpl","type":"address"},{"internalType":"address[]","name":"_supportedPrevImpls","type":"address[]"}],"name":"registerNewUpgradePath","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"resignOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newOwner","type":"address"}],"name":"safeTransferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newImpl","type":"address"},{"internalType":"address","name":"_prevImpl","type":"address"}],"name":"unregisterUpgradePath","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60808060405234601557610867908161001b8239f35b600080fdfe6080604081815260048036101561001557600080fd5b600092833560e01c90816323452b9c146106ea57508063395db2cd146106685780634dc5b7c71461061a57806373995833146105cc57806379ba5097146105775780638466a71c146104cc57806389428654146103ac5780638da5cb5b14610384578063c4d66de814610198578063e30c39781461016b578063ed0c7091146101065763f2fde38b146100a757600080fd5b34610102576020366003190112610102576100c061075d565b916001600160a01b03808416156100f45784541633036100e757836100e4846107c8565b80f35b5163d238ed5960e01b8152fd5b5051631627621f60e11b8152fd5b8280fd5b50346101025782600319360112610102578254916001600160a01b039182841691338390036100e757505083906000805160206108128339815191528280a36001600160a01b03199182168355600154908116610161578280f35b1660015538808280f35b50503461019457816003193601126101945760015490516001600160a01b039091168152602090f35b5080fd5b5034610102576020366003190112610102576101b261075d565b6034549060ff8260081c161591828093610377575b8015610360575b156103065760ff198116600117603455826102f4575b506001600160a01b03169283156102e5576034549260ff8460081c161561028f575084546001600160a01b031916841785555192846000805160206108128339815191528180a37f0c52cc367a132cac0ea9f3a1e1f75873b17977858812b85c89a9654486e444388480a1610257578280f35b61ff001916603455600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602090a138808280f35b6020608492519162461bcd60e51b8352820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152fd5b51631627621f60e11b81529050fd5b61ffff191661010117603455386101e4565b845162461bcd60e51b8152602081860152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608490fd5b50303b1580156101ce5750600160ff8216146101ce565b50600160ff8216106101c7565b505034610194578160031936011261019457905490516001600160a01b039091168152602090f35b5090346101025780600319360112610102576103c661075d565b67ffffffffffffffff6024358181116104c857366023820112156104c857808501359182116104c8576024810190602436918460051b0101116104c85785546001600160a01b039590861633036104ba575082851694865b838110610429578780f35b600190878952602060688152878a20908461044d610448858a8a61078e565b6107b4565b168b5252868920805460ff1916831790557f7acfb66a4ce41040d432f980d35151e6d37f3279e6f8dbf383b0f5112271462f6104b161049061044884898961078e565b89516001600160a01b03808b16825290911660208201529081906040820190565b0390a10161041e565b845163d238ed5960e01b8152fd5b8580fd5b508290346101945782600319360112610194576104e761075d565b6104ef610778565b835490926001600160a01b03918216330361056957508082168452606860209081528585209184168552908152848420805460ff1916905593516001600160a01b039182168152911692810192909252907fa3a0491075ec5f5949945a6f452fb9e0619a4dacc65a568ad2da3210cc91cdab90604090a180f35b855163d238ed5960e01b8152fd5b50346101025782600319360112610102576001546001600160a01b039290831633036105bf57505033908254166000805160206108128339815191528380a36100e4336107c8565b5163065cd53160e01b8152fd5b50503461019457806003193601126101945760ff816020936105ec61075d565b6105f4610778565b6001600160a01b0391821683526068875283832091168252855220549151911615158152f35b50503461019457806003193601126101945760ff8160209361063a61075d565b610642610778565b6001600160a01b0391821683526035875283832091168252855220549151911615158152f35b509034610102576020366003190112610102576001600160a01b03918261068d61075d565b169283156106db57845416918233036100e7575050600180546001600160a01b031916831790557f4f2638f5949b9614ef8d5e268cb51348ad7f434a34812bf64b6e95014fbd357e8380a380f35b509051631627621f60e11b8152fd5b8285913461010257826003193601126101025782546001600160a01b03929083169133839003610751575050600154918216907f682679deecef4dcd49674845cc1e3a075fea9073680aa445a8207d5a4bdea3da8480a36001600160a01b03191660015580f35b63d238ed5960e01b8152fd5b600435906001600160a01b038216820361077357565b600080fd5b602435906001600160a01b038216820361077357565b919081101561079e5760051b0190565b634e487b7160e01b600052603260045260246000fd5b356001600160a01b03811681036107735790565b6000549060018060a01b0380911680828416600080516020610812833981519152600080a36001600160a01b03199283161760005560015490811661080b575050565b1660015556fe8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d76a2646970667358221220f22065e59b39365dadad98e8f9c8d1d7c0fc4d6d834426f3971ce1c2a77db4dd64736f6c63430008190033

Deployed Bytecode

0x6080604081815260048036101561001557600080fd5b600092833560e01c90816323452b9c146106ea57508063395db2cd146106685780634dc5b7c71461061a57806373995833146105cc57806379ba5097146105775780638466a71c146104cc57806389428654146103ac5780638da5cb5b14610384578063c4d66de814610198578063e30c39781461016b578063ed0c7091146101065763f2fde38b146100a757600080fd5b34610102576020366003190112610102576100c061075d565b916001600160a01b03808416156100f45784541633036100e757836100e4846107c8565b80f35b5163d238ed5960e01b8152fd5b5051631627621f60e11b8152fd5b8280fd5b50346101025782600319360112610102578254916001600160a01b039182841691338390036100e757505083906000805160206108128339815191528280a36001600160a01b03199182168355600154908116610161578280f35b1660015538808280f35b50503461019457816003193601126101945760015490516001600160a01b039091168152602090f35b5080fd5b5034610102576020366003190112610102576101b261075d565b6034549060ff8260081c161591828093610377575b8015610360575b156103065760ff198116600117603455826102f4575b506001600160a01b03169283156102e5576034549260ff8460081c161561028f575084546001600160a01b031916841785555192846000805160206108128339815191528180a37f0c52cc367a132cac0ea9f3a1e1f75873b17977858812b85c89a9654486e444388480a1610257578280f35b61ff001916603455600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602090a138808280f35b6020608492519162461bcd60e51b8352820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152fd5b51631627621f60e11b81529050fd5b61ffff191661010117603455386101e4565b845162461bcd60e51b8152602081860152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608490fd5b50303b1580156101ce5750600160ff8216146101ce565b50600160ff8216106101c7565b505034610194578160031936011261019457905490516001600160a01b039091168152602090f35b5090346101025780600319360112610102576103c661075d565b67ffffffffffffffff6024358181116104c857366023820112156104c857808501359182116104c8576024810190602436918460051b0101116104c85785546001600160a01b039590861633036104ba575082851694865b838110610429578780f35b600190878952602060688152878a20908461044d610448858a8a61078e565b6107b4565b168b5252868920805460ff1916831790557f7acfb66a4ce41040d432f980d35151e6d37f3279e6f8dbf383b0f5112271462f6104b161049061044884898961078e565b89516001600160a01b03808b16825290911660208201529081906040820190565b0390a10161041e565b845163d238ed5960e01b8152fd5b8580fd5b508290346101945782600319360112610194576104e761075d565b6104ef610778565b835490926001600160a01b03918216330361056957508082168452606860209081528585209184168552908152848420805460ff1916905593516001600160a01b039182168152911692810192909252907fa3a0491075ec5f5949945a6f452fb9e0619a4dacc65a568ad2da3210cc91cdab90604090a180f35b855163d238ed5960e01b8152fd5b50346101025782600319360112610102576001546001600160a01b039290831633036105bf57505033908254166000805160206108128339815191528380a36100e4336107c8565b5163065cd53160e01b8152fd5b50503461019457806003193601126101945760ff816020936105ec61075d565b6105f4610778565b6001600160a01b0391821683526068875283832091168252855220549151911615158152f35b50503461019457806003193601126101945760ff8160209361063a61075d565b610642610778565b6001600160a01b0391821683526035875283832091168252855220549151911615158152f35b509034610102576020366003190112610102576001600160a01b03918261068d61075d565b169283156106db57845416918233036100e7575050600180546001600160a01b031916831790557f4f2638f5949b9614ef8d5e268cb51348ad7f434a34812bf64b6e95014fbd357e8380a380f35b509051631627621f60e11b8152fd5b8285913461010257826003193601126101025782546001600160a01b03929083169133839003610751575050600154918216907f682679deecef4dcd49674845cc1e3a075fea9073680aa445a8207d5a4bdea3da8480a36001600160a01b03191660015580f35b63d238ed5960e01b8152fd5b600435906001600160a01b038216820361077357565b600080fd5b602435906001600160a01b038216820361077357565b919081101561079e5760051b0190565b634e487b7160e01b600052603260045260246000fd5b356001600160a01b03811681036107735790565b6000549060018060a01b0380911680828416600080516020610812833981519152600080a36001600160a01b03199283161760005560015490811661080b575050565b1660015556fe8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d76a2646970667358221220f22065e59b39365dadad98e8f9c8d1d7c0fc4d6d834426f3971ce1c2a77db4dd64736f6c63430008190033

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  ]

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.