More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 1,383 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Redeem | 28692780 | 45 hrs ago | IN | 0 ETH | 0.00000606 | ||||
| Redeem | 28589817 | 5 days ago | IN | 0 ETH | 0.00000458 | ||||
| Redeem | 28562345 | 6 days ago | IN | 0 ETH | 0.00000407 | ||||
| Update New Total... | 28555847 | 6 days ago | IN | 0 ETH | 0.00000471 | ||||
| Redeem | 28497122 | 8 days ago | IN | 0 ETH | 0.00000417 | ||||
| Redeem | 28493864 | 8 days ago | IN | 0 ETH | 0.00000398 | ||||
| Redeem | 28493210 | 8 days ago | IN | 0 ETH | 0.00000505 | ||||
| Update New Total... | 28471630 | 9 days ago | IN | 0 ETH | 0.0000053 | ||||
| Redeem | 28440744 | 10 days ago | IN | 0 ETH | 0.00000379 | ||||
| Request Redeem | 28410065 | 11 days ago | IN | 0 ETH | 0.00000457 | ||||
| Redeem | 28382719 | 12 days ago | IN | 0 ETH | 0.00000417 | ||||
| Claim Shares And... | 28376279 | 12 days ago | IN | 0 ETH | 0.00000502 | ||||
| Redeem | 28369543 | 12 days ago | IN | 0 ETH | 0.00000349 | ||||
| Claim Shares And... | 28368790 | 12 days ago | IN | 0 ETH | 0.00000572 | ||||
| Redeem | 28339494 | 13 days ago | IN | 0 ETH | 0.00000417 | ||||
| Update New Total... | 28336165 | 13 days ago | IN | 0 ETH | 0.00000484 | ||||
| Redeem | 28257651 | 15 days ago | IN | 0 ETH | 0.00000401 | ||||
| Claim Shares And... | 28146016 | 18 days ago | IN | 0 ETH | 0.00000487 | ||||
| Redeem | 28067754 | 20 days ago | IN | 0 ETH | 0.00000294 | ||||
| Redeem | 28014083 | 21 days ago | IN | 0 ETH | 0.00000335 | ||||
| Sync Deposit | 27917987 | 23 days ago | IN | 0 ETH | 0.00000377 | ||||
| Claim Shares And... | 27857009 | 25 days ago | IN | 0 ETH | 0.0000036 | ||||
| Claim Shares And... | 27631250 | 30 days ago | IN | 0 ETH | 0.00000428 | ||||
| Request Redeem | 27562434 | 32 days ago | IN | 0 ETH | 0.00000366 | ||||
| Claim Shares And... | 27369970 | 36 days ago | IN | 0 ETH | 0.00000392 |
Latest 25 internal transactions (View All)
Advanced mode:
| Parent Transaction Hash | Block | From | To | |||
|---|---|---|---|---|---|---|
| 28692780 | 45 hrs ago | 0 ETH | ||||
| 28692780 | 45 hrs ago | 0 ETH | ||||
| 28589817 | 5 days ago | 0 ETH | ||||
| 28589817 | 5 days ago | 0 ETH | ||||
| 28562345 | 6 days ago | 0 ETH | ||||
| 28562345 | 6 days ago | 0 ETH | ||||
| 28555900 | 6 days ago | 0 ETH | ||||
| 28555900 | 6 days ago | 0 ETH | ||||
| 28555900 | 6 days ago | 0 ETH | ||||
| 28555900 | 6 days ago | 0 ETH | ||||
| 28555900 | 6 days ago | 0 ETH | ||||
| 28555900 | 6 days ago | 0 ETH | ||||
| 28555847 | 6 days ago | 0 ETH | ||||
| 28555847 | 6 days ago | 0 ETH | ||||
| 28555776 | 6 days ago | 0 ETH | ||||
| 28555776 | 6 days ago | 0 ETH | ||||
| 28555666 | 6 days ago | 0 ETH | ||||
| 28555666 | 6 days ago | 0 ETH | ||||
| 28497122 | 8 days ago | 0 ETH | ||||
| 28497122 | 8 days ago | 0 ETH | ||||
| 28493864 | 8 days ago | 0 ETH | ||||
| 28493864 | 8 days ago | 0 ETH | ||||
| 28493210 | 8 days ago | 0 ETH | ||||
| 28493210 | 8 days ago | 0 ETH | ||||
| 28476809 | 9 days ago | 0 ETH |
Loading...
Loading
Contract Name:
OptinProxy
Compiler Version
v0.8.26+commit.8a97fa7a
Optimization Enabled:
Yes with 1 runs
Other Settings:
london EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: BUSL-1.1
pragma solidity "0.8.26";
import {LogicRegistry} from "../protocol-v2/LogicRegistry.sol";
import {
ERC1967Utils,
ITransparentUpgradeableProxy,
TransparentUpgradeableProxy
} from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol";
import {IERC1967} from "@openzeppelin/contracts/interfaces/IERC1967.sol";
import {ERC1967Proxy} from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol";
import {DelayProxyAdmin} from "./DelayProxyAdmin.sol";
/**
* @dev This contract implements a proxy that is upgradeable through an associated {DelayProxyAdmin} instance.
*
* To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector
* clashing], which can potentially be used in an attack, this contract uses the
* https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two
* things that go hand in hand:
*
* 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if
* that call matches the {ITransparentUpgradeableProxy-upgradeToAndCall} function exposed by the proxy itself.
* 2. If the admin calls the proxy, it can call the `upgradeToAndCall` function but any other call won't be forwarded to
* the implementation. If the admin tries to call a function on the implementation it will fail with an error indicating
* the proxy admin cannot fallback to the target implementation.
*
* These properties mean that the admin account can only be used for upgrading the proxy, so it's best if it's a
* dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to
* call a function from the proxy implementation. For this reason, the proxy deploys an instance of {ProxyAdmin} and
* allows upgrades only if they come through it. You should think of the `ProxyAdmin` instance as the administrative
* interface of the proxy, including the ability to change who can trigger upgrades by transferring ownership.
*
* NOTE: The real interface of this proxy is that defined in `ITransparentUpgradeableProxy`. This contract does not
* inherit from that interface, and instead `upgradeToAndCall` is implicitly implemented using a custom dispatch
* mechanism in `_fallback`. Consequently, the compiler will not produce an ABI for this contract. This is necessary to
* fully implement transparency without decoding reverts caused by selector clashes between the proxy and the
* implementation.
*
* NOTE: This proxy does not inherit from {Context} deliberately. The {DelayProxyAdmin} of this contract won't send a
* meta-transaction in any way, and any other meta-transaction setup should be made in the implementation contract.
*
* IMPORTANT: This contract avoids unnecessary storage reads by setting the admin only during construction as an
* immutable variable, preventing any changes thereafter. However, the admin slot defined in ERC-1967 can still be
* overwritten by the implementation logic pointed to by this proxy. In such cases, the contract may end up in an
* undesirable state where the admin slot is different from the actual admin.
*
* WARNING: It is not recommended to extend this contract to add additional external functions. If you do so, the
* compiler will not check that there are no selector conflicts, due to the note above. A selector clash between any new
* function and the functions declared in {ITransparentUpgradeableProxy} will be resolved in favor of the new one. This
* could render the `upgradeToAndCall` function inaccessible, preventing upgradeability and compromising transparency.
*/
/// @title OptinProxy
/// @notice A transparent upgradeable proxy that allows opting into logic upgrades through a registry
/// @dev Extends TransparentUpgradeableProxy with additional logic verification through a registry
/// @custom:contact [email protected]
contract OptinProxy is ERC1967Proxy {
// An immutable address for the admin to avoid unnecessary SLOADs before each call
// at the expense of removing the ability to change the admin once it's set.
// This is acceptable if the admin is always a ProxyAdmin instance or similar contract
// with its own ability to transfer the permissions to another account.
address private immutable _admin;
/// @notice The immutable logic registry contract that governs which logic implementations can be used
LogicRegistry public immutable REGISTRY;
///@notice The proxy caller is the current admin, and can't fallback to the proxy target.
error ProxyDeniedAdminAccess();
/// @notice Error thrown when an unauthorized logic update is attempted
error UpdateNotAllowed();
/// @notice Constructs the OptinProxy contract
/// @dev Initializes the proxy with logic, registry, admin and initialization data
/// @param _logic The initial logic implementation address (can be zero to use registry's default)
/// @param _logicRegistry The address of the logic registry contract
/// @param _initialOwner The initial owner/admin of the proxy
/// @param _initialDelay The initial delay before which an upgrade can occur by the proxy admin
/// @param _data The initialization data to pass to the logic contract
constructor(
address _logic,
address _logicRegistry,
address _initialOwner,
uint256 _initialDelay,
bytes memory _data
) payable ERC1967Proxy(_logicAtConstruction(_logic, _logicRegistry), _data) {
_admin = address(new DelayProxyAdmin(_initialOwner, _initialDelay));
// Set the storage value and emit an event for ERC-1967 compatibility
ERC1967Utils.changeAdmin(_proxyAdmin());
REGISTRY = LogicRegistry(_logicRegistry);
}
/// @dev Returns the admin of this proxy.
function _proxyAdmin() internal virtual returns (address) {
return _admin;
}
/// @notice Determines the appropriate logic address to use at construction time
/// @dev If _logic is zero, uses registry's default. Otherwise verifies the logic is allowed
/// @param _logic The proposed logic implementation address
/// @param _logicRegistry The registry contract to check against
/// @return The validated logic implementation address
function _logicAtConstruction(address _logic, address _logicRegistry) internal view returns (address) {
if (_logic == address(0)) {
return LogicRegistry(_logicRegistry).defaultLogic();
}
if (!LogicRegistry(_logicRegistry).canUseLogic(_implementation(), _logic)) revert UpdateNotAllowed();
return _logic;
}
/// @notice Handles fallback calls to the proxy
/// @dev If caller is admin, processes upgrade calls with registry verification. Otherwise forwards transparently.
/// @custom:behavior When msg.sender is admin:
/// - Only upgradeToAndCall calls are allowed
/// - Verifies new implementation with registry before upgrading
/// @custom:behavior When msg.sender is not admin:
/// - Forwards call transparently to current implementation
function _fallback() internal virtual override {
if (msg.sender == _proxyAdmin()) {
if (msg.sig != ITransparentUpgradeableProxy.upgradeToAndCall.selector) {
revert ProxyDeniedAdminAccess();
} else {
// equivalent to TransparentUpgradeableProxy.dispatchUpgradeToAndCall
// with a check to the registry first.
(address newImplementation, bytes memory data) = abi.decode(msg.data[4:], (address, bytes));
if (!REGISTRY.canUseLogic(_implementation(), newImplementation)) {
revert UpdateNotAllowed();
}
ERC1967Utils.upgradeToAndCall(newImplementation, data);
}
} else {
super._fallback();
}
}
}// SPDX-License-Identifier: BUSL-1.1
pragma solidity "0.8.26";
import {Ownable2StepUpgradeable} from "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol";
/// @title LogicRegistry
/// @notice Abstract contract for managing whitelisted logic implementations and default logic
/// @dev Inherits from Ownable2StepUpgradeable to provide ownership functionality with 2-step transfer
/// @dev Implements ILogicRegistry interface for standard registry functions
/// @custom:contact [email protected]
abstract contract LogicRegistry is Ownable2StepUpgradeable {
error LogicNotWhitelisted(address Logic);
error CantRemoveDefaultLogic();
event DefaultLogicUpdated(address previous, address newImpl);
event LogicAdded(address Logic);
event LogicRemoved(address Logic);
/// @custom:storage-location erc7201:hopper.storage.LogicRegistry
/// @notice Storage layout for the LogicRegistry contract
struct LogicRegistryStorage {
/// @notice Address of the default logic implementation
address defaultLogic;
/// @notice Mapping of logic addresses to their whitelist status
mapping(address logic => bool) whitelist;
}
// Storage slot for LogicRegistryStorage
// keccak256(abi.encode(uint256(keccak256("hopper.storage.LogicRegistry")) - 1)) & ~bytes32(uint256(0xff));
bytes32 private constant logicRegistryStorage = 0x1f7af4bd0bb99469a9721ca3a846842162947039ac74427c73a74c47aae0d400;
/// @notice Returns the storage struct at the predefined slot
/// @dev Uses assembly to access storage at a specific slot
/// @return $ The storage struct
function _getLogicRegistryStorage() internal pure returns (LogicRegistryStorage storage $) {
assembly {
$.slot := logicRegistryStorage
}
}
/// @notice Updates the default logic implementation
/// @dev Only callable by owner. Automatically adds new logic to whitelist if not already present
/// @param _newLogic Address of the new default logic implementation
function updateDefaultLogic(
address _newLogic
) public onlyOwner {
if (!_getLogicRegistryStorage().whitelist[_newLogic]) {
addLogic(_newLogic);
}
address previous = _getLogicRegistryStorage().defaultLogic;
_getLogicRegistryStorage().defaultLogic = _newLogic;
emit DefaultLogicUpdated(previous, _newLogic);
}
/// @notice Removes a logic implementation from the whitelist
/// @dev Only callable by owner. Does not affect default logic if removed.
/// @param _logic Address of the logic implementation to remove
function removeLogic(
address _logic
) public onlyOwner {
if (_logic == _getLogicRegistryStorage().defaultLogic) {
revert CantRemoveDefaultLogic();
}
_getLogicRegistryStorage().whitelist[_logic] = false;
emit LogicRemoved(_logic);
}
/// @notice Adds a logic implementation to the whitelist
/// @dev Only callable by owner
/// @param _newLogic Address of the logic implementation to add
function addLogic(
address _newLogic
) public onlyOwner {
_getLogicRegistryStorage().whitelist[_newLogic] = true;
emit LogicAdded(_newLogic);
}
/// @notice Checks if a logic implementation can be used
/// @dev Ignores the fromLogic parameter (present in interface) and only checks whitelist status for now
/// @param fromLogic Previous logic implementation (unused in this implementation)
/// @param logic Address of the logic implementation to check
/// @return True if the logic is whitelisted, false otherwise
function canUseLogic(address fromLogic, address logic) public view returns (bool) {
if (owner() == address(0)) return true; // logic can always be used if the protocol renounceOwnership()
return _getLogicRegistryStorage().whitelist[logic];
}
/// @notice Returns the current default logic implementation address
/// @return Address of the default logic implementation
function defaultLogic() external view returns (address) {
return _getLogicRegistryStorage().defaultLogic;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (proxy/transparent/TransparentUpgradeableProxy.sol)
pragma solidity ^0.8.20;
import {ERC1967Utils} from "../ERC1967/ERC1967Utils.sol";
import {ERC1967Proxy} from "../ERC1967/ERC1967Proxy.sol";
import {IERC1967} from "../../interfaces/IERC1967.sol";
import {ProxyAdmin} from "./ProxyAdmin.sol";
/**
* @dev Interface for {TransparentUpgradeableProxy}. In order to implement transparency, {TransparentUpgradeableProxy}
* does not implement this interface directly, and its upgradeability mechanism is implemented by an internal dispatch
* mechanism. The compiler is unaware that these functions are implemented by {TransparentUpgradeableProxy} and will not
* include them in the ABI so this interface must be used to interact with it.
*/
interface ITransparentUpgradeableProxy is IERC1967 {
function upgradeToAndCall(address, bytes calldata) external payable;
}
/**
* @dev This contract implements a proxy that is upgradeable through an associated {ProxyAdmin} instance.
*
* To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector
* clashing], which can potentially be used in an attack, this contract uses the
* https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two
* things that go hand in hand:
*
* 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if
* that call matches the {ITransparentUpgradeableProxy-upgradeToAndCall} function exposed by the proxy itself.
* 2. If the admin calls the proxy, it can call the `upgradeToAndCall` function but any other call won't be forwarded to
* the implementation. If the admin tries to call a function on the implementation it will fail with an error indicating
* the proxy admin cannot fallback to the target implementation.
*
* These properties mean that the admin account can only be used for upgrading the proxy, so it's best if it's a
* dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to
* call a function from the proxy implementation. For this reason, the proxy deploys an instance of {ProxyAdmin} and
* allows upgrades only if they come through it. You should think of the `ProxyAdmin` instance as the administrative
* interface of the proxy, including the ability to change who can trigger upgrades by transferring ownership.
*
* NOTE: The real interface of this proxy is that defined in `ITransparentUpgradeableProxy`. This contract does not
* inherit from that interface, and instead `upgradeToAndCall` is implicitly implemented using a custom dispatch
* mechanism in `_fallback`. Consequently, the compiler will not produce an ABI for this contract. This is necessary to
* fully implement transparency without decoding reverts caused by selector clashes between the proxy and the
* implementation.
*
* NOTE: This proxy does not inherit from {Context} deliberately. The {ProxyAdmin} of this contract won't send a
* meta-transaction in any way, and any other meta-transaction setup should be made in the implementation contract.
*
* IMPORTANT: This contract avoids unnecessary storage reads by setting the admin only during construction as an
* immutable variable, preventing any changes thereafter. However, the admin slot defined in ERC-1967 can still be
* overwritten by the implementation logic pointed to by this proxy. In such cases, the contract may end up in an
* undesirable state where the admin slot is different from the actual admin.
*
* WARNING: It is not recommended to extend this contract to add additional external functions. If you do so, the
* compiler will not check that there are no selector conflicts, due to the note above. A selector clash between any new
* function and the functions declared in {ITransparentUpgradeableProxy} will be resolved in favor of the new one. This
* could render the `upgradeToAndCall` function inaccessible, preventing upgradeability and compromising transparency.
*/
contract TransparentUpgradeableProxy is ERC1967Proxy {
// An immutable address for the admin to avoid unnecessary SLOADs before each call
// at the expense of removing the ability to change the admin once it's set.
// This is acceptable if the admin is always a ProxyAdmin instance or similar contract
// with its own ability to transfer the permissions to another account.
address private immutable _admin;
/**
* @dev The proxy caller is the current admin, and can't fallback to the proxy target.
*/
error ProxyDeniedAdminAccess();
/**
* @dev Initializes an upgradeable proxy managed by an instance of a {ProxyAdmin} with an `initialOwner`,
* backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in
* {ERC1967Proxy-constructor}.
*/
constructor(address _logic, address initialOwner, bytes memory _data) payable ERC1967Proxy(_logic, _data) {
_admin = address(new ProxyAdmin(initialOwner));
// Set the storage value and emit an event for ERC-1967 compatibility
ERC1967Utils.changeAdmin(_proxyAdmin());
}
/**
* @dev Returns the admin of this proxy.
*/
function _proxyAdmin() internal virtual returns (address) {
return _admin;
}
/**
* @dev If caller is the admin process the call internally, otherwise transparently fallback to the proxy behavior.
*/
function _fallback() internal virtual override {
if (msg.sender == _proxyAdmin()) {
if (msg.sig != ITransparentUpgradeableProxy.upgradeToAndCall.selector) {
revert ProxyDeniedAdminAccess();
} else {
_dispatchUpgradeToAndCall();
}
} else {
super._fallback();
}
}
/**
* @dev Upgrade the implementation of the proxy. See {ERC1967Utils-upgradeToAndCall}.
*
* Requirements:
*
* - If `data` is empty, `msg.value` must be zero.
*/
function _dispatchUpgradeToAndCall() private {
(address newImplementation, bytes memory data) = abi.decode(msg.data[4:], (address, bytes));
ERC1967Utils.upgradeToAndCall(newImplementation, data);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC1967.sol)
pragma solidity ^0.8.20;
/**
* @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC.
*/
interface IERC1967 {
/**
* @dev Emitted when the implementation is upgraded.
*/
event Upgraded(address indexed implementation);
/**
* @dev Emitted when the admin account has changed.
*/
event AdminChanged(address previousAdmin, address newAdmin);
/**
* @dev Emitted when the beacon is changed.
*/
event BeaconUpgraded(address indexed beacon);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (proxy/ERC1967/ERC1967Proxy.sol)
pragma solidity ^0.8.20;
import {Proxy} from "../Proxy.sol";
import {ERC1967Utils} from "./ERC1967Utils.sol";
/**
* @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an
* implementation address that can be changed. This address is stored in storage in the location specified by
* https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the
* implementation behind the proxy.
*/
contract ERC1967Proxy is Proxy {
/**
* @dev Initializes the upgradeable proxy with an initial implementation specified by `implementation`.
*
* If `_data` is nonempty, it's used as data in a delegate call to `implementation`. This will typically be an
* encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.
*
* Requirements:
*
* - If `data` is empty, `msg.value` must be zero.
*/
constructor(address implementation, bytes memory _data) payable {
ERC1967Utils.upgradeToAndCall(implementation, _data);
}
/**
* @dev Returns the current implementation address.
*
* TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using
* the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.
* `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`
*/
function _implementation() internal view virtual override returns (address) {
return ERC1967Utils.getImplementation();
}
}// SPDX-License-Identifier: BUSL-1.1
pragma solidity "0.8.26";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {ProxyAdmin} from "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol";
import {ITransparentUpgradeableProxy} from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol";
/// @custom:contact [email protected]
contract DelayProxyAdmin is ProxyAdmin {
///@notice The `delay` period is not terminated
error DelayIsNotOver();
///@notice The `new delay` must be above `minDelay`
error DelayTooLow(uint256 minDelay);
///@notice The `new delay` must be under `maxDelay`
error DelayTooHigh(uint256 maxDelay);
///@notice The implemenation to update to must the one submitted previously.
error ImplenentationInconsistent(address expected);
/// @notice The `newImplementation` address will be enforcable at `implementationUpdateTime`
event ImplementationUpdateSubmited(address indexed newImplementation, uint256 implementationUpdateTime);
/// @notice The `currentDelay` will be enforcable to `newDelay` at `delayUpdateTime`
event DelayUpdateSubmited(uint256 currentDelay, uint256 newDelay, uint256 delayUpdateTime);
/// @notice The `currentDelay` will be replacable by a `newDelay` period at `delayUpdateTime`
event DelayUpdated(uint256 newDelay, uint256 oldDelay);
/// @notice The maximum delay before which the implementation and the delay can be upgraded
uint256 public constant MAX_DELAY = 30 days;
/// @notice The minimum delay before which the implementation and the delay can be upgraded
uint256 public constant MIN_DELAY = 1 days;
/// @notice The time at which upgradeAndCall is callable
uint256 public implementationUpdateTime;
/// @notice The new `implementation` enforced after `upgradeAndCall`
address public newImplementation;
/// @notice The time at which `updateDelay` is callable
uint256 public delayUpdateTime;
/// @notice The new `delay` enforced after `updateDelay`
uint256 public newDelay;
/// @notice The time to wait before upgradeAndCall and updateDelay can be call to enforce `implementation` and
/// `newDelay` respectively
uint256 public delay;
/// @notice Initializes the DelayProxyAdmin contract
/// @dev Sets up the contract with initial owner and delay parameters
/// @param initialOwner The address that will own this contract
/// @param initialDelay The initial delay period that must be waited before upgrades can be executed
constructor(address initialOwner, uint256 initialDelay) ProxyAdmin(initialOwner) {
if (initialDelay < MIN_DELAY) {
revert DelayTooLow(MIN_DELAY);
}
if (initialDelay > MAX_DELAY) {
revert DelayTooHigh(MAX_DELAY);
}
implementationUpdateTime = type(uint256).max;
delayUpdateTime = type(uint256).max;
delay = initialDelay;
emit DelayUpdated(initialDelay, 0);
}
/// @notice Submits a new delay period for future enforcement
/// @dev Starts the timelock period for the delay update
/// @param _delay The new delay period to be enforced after the timelock
///
/// Requirements:
/// - Must be called by the owner
/// - The _delay must be within MIN_DELAY and MAX_DELAY bounds
function submitDelay(
uint256 _delay
) external onlyOwner {
if (_delay < MIN_DELAY) {
revert DelayTooLow(MIN_DELAY);
}
if (_delay > MAX_DELAY) {
revert DelayTooHigh(MAX_DELAY);
}
newDelay = _delay;
delayUpdateTime = block.timestamp + delay;
emit DelayUpdateSubmited(delay, newDelay, delayUpdateTime);
}
/// @notice Updates the delay period to the previously submitted new delay
/// @dev Can only be called by the owner after the delay period has passed
///
/// Requirements:
/// - Must be called by the owner
/// - The delayUpdateTime must have passed
function updateDelay() external onlyOwner {
if (block.timestamp < delayUpdateTime) {
revert DelayIsNotOver();
}
emit DelayUpdated(newDelay, delay);
delay = newDelay;
newDelay = 0;
delayUpdateTime = type(uint256).max;
}
/// @notice Submits a new implementation address for future enforcement
/// @dev Starts the timelock period for the implementation upgrade
/// @param _implementation The new implementation to be enforced after the timelock
///
/// Requirements:
/// - Must be called by the owner
function submitImplementation(
address _implementation
) external onlyOwner {
newImplementation = _implementation;
implementationUpdateTime = block.timestamp + delay;
emit ImplementationUpdateSubmited(newImplementation, implementationUpdateTime);
}
/// @dev Upgrades `proxy` to `implementation` and calls a function on the new implementation.
/// See {TransparentUpgradeableProxy-_dispatchUpgradeToAndCall}.
///
/// Requirements:
///
/// - This contract must be the admin of `proxy`.
/// - If `data` is empty, `msg.value` must be zero.
function upgradeAndCall(
ITransparentUpgradeableProxy proxy,
address,
bytes memory data
) public payable override onlyOwner {
if (block.timestamp < implementationUpdateTime) {
revert DelayIsNotOver();
}
proxy.upgradeToAndCall{value: msg.value}(newImplementation, data);
newImplementation = address(0);
implementationUpdateTime = type(uint256).max;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable2Step.sol)
pragma solidity ^0.8.20;
import {OwnableUpgradeable} from "./OwnableUpgradeable.sol";
import {Initializable} from "../proxy/utils/Initializable.sol";
/**
* @dev Contract module which provides access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* The initial owner is specified at deployment time in the constructor for `Ownable`. This
* can later be changed with {transferOwnership} and {acceptOwnership}.
*
* This module is used through inheritance. It will make available all functions
* from parent (Ownable).
*/
abstract contract Ownable2StepUpgradeable is Initializable, OwnableUpgradeable {
/// @custom:storage-location erc7201:openzeppelin.storage.Ownable2Step
struct Ownable2StepStorage {
address _pendingOwner;
}
// keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Ownable2Step")) - 1)) & ~bytes32(uint256(0xff))
bytes32 private constant Ownable2StepStorageLocation = 0x237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c00;
function _getOwnable2StepStorage() private pure returns (Ownable2StepStorage storage $) {
assembly {
$.slot := Ownable2StepStorageLocation
}
}
event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner);
function __Ownable2Step_init() internal onlyInitializing {
}
function __Ownable2Step_init_unchained() internal onlyInitializing {
}
/**
* @dev Returns the address of the pending owner.
*/
function pendingOwner() public view virtual returns (address) {
Ownable2StepStorage storage $ = _getOwnable2StepStorage();
return $._pendingOwner;
}
/**
* @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one.
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual override onlyOwner {
Ownable2StepStorage storage $ = _getOwnable2StepStorage();
$._pendingOwner = newOwner;
emit OwnershipTransferStarted(owner(), newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner.
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual override {
Ownable2StepStorage storage $ = _getOwnable2StepStorage();
delete $._pendingOwner;
super._transferOwnership(newOwner);
}
/**
* @dev The new owner accepts the ownership transfer.
*/
function acceptOwnership() public virtual {
address sender = _msgSender();
if (pendingOwner() != sender) {
revert OwnableUnauthorizedAccount(sender);
}
_transferOwnership(sender);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (proxy/ERC1967/ERC1967Utils.sol)
pragma solidity ^0.8.20;
import {IBeacon} from "../beacon/IBeacon.sol";
import {Address} from "../../utils/Address.sol";
import {StorageSlot} from "../../utils/StorageSlot.sol";
/**
* @dev This abstract contract provides getters and event emitting update functions for
* https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.
*/
library ERC1967Utils {
// We re-declare ERC-1967 events here because they can't be used directly from IERC1967.
// This will be fixed in Solidity 0.8.21. At that point we should remove these events.
/**
* @dev Emitted when the implementation is upgraded.
*/
event Upgraded(address indexed implementation);
/**
* @dev Emitted when the admin account has changed.
*/
event AdminChanged(address previousAdmin, address newAdmin);
/**
* @dev Emitted when the beacon is changed.
*/
event BeaconUpgraded(address indexed beacon);
/**
* @dev Storage slot with the address of the current implementation.
* This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1.
*/
// solhint-disable-next-line private-vars-leading-underscore
bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
/**
* @dev The `implementation` of the proxy is invalid.
*/
error ERC1967InvalidImplementation(address implementation);
/**
* @dev The `admin` of the proxy is invalid.
*/
error ERC1967InvalidAdmin(address admin);
/**
* @dev The `beacon` of the proxy is invalid.
*/
error ERC1967InvalidBeacon(address beacon);
/**
* @dev An upgrade function sees `msg.value > 0` that may be lost.
*/
error ERC1967NonPayable();
/**
* @dev Returns the current implementation address.
*/
function getImplementation() internal view returns (address) {
return StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value;
}
/**
* @dev Stores a new address in the EIP1967 implementation slot.
*/
function _setImplementation(address newImplementation) private {
if (newImplementation.code.length == 0) {
revert ERC1967InvalidImplementation(newImplementation);
}
StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value = newImplementation;
}
/**
* @dev Performs implementation upgrade with additional setup call if data is nonempty.
* This function is payable only if the setup call is performed, otherwise `msg.value` is rejected
* to avoid stuck value in the contract.
*
* Emits an {IERC1967-Upgraded} event.
*/
function upgradeToAndCall(address newImplementation, bytes memory data) internal {
_setImplementation(newImplementation);
emit Upgraded(newImplementation);
if (data.length > 0) {
Address.functionDelegateCall(newImplementation, data);
} else {
_checkNonPayable();
}
}
/**
* @dev Storage slot with the admin of the contract.
* This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1.
*/
// solhint-disable-next-line private-vars-leading-underscore
bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;
/**
* @dev Returns the current admin.
*
* TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using
* the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.
* `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`
*/
function getAdmin() internal view returns (address) {
return StorageSlot.getAddressSlot(ADMIN_SLOT).value;
}
/**
* @dev Stores a new address in the EIP1967 admin slot.
*/
function _setAdmin(address newAdmin) private {
if (newAdmin == address(0)) {
revert ERC1967InvalidAdmin(address(0));
}
StorageSlot.getAddressSlot(ADMIN_SLOT).value = newAdmin;
}
/**
* @dev Changes the admin of the proxy.
*
* Emits an {IERC1967-AdminChanged} event.
*/
function changeAdmin(address newAdmin) internal {
emit AdminChanged(getAdmin(), newAdmin);
_setAdmin(newAdmin);
}
/**
* @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.
* This is the keccak-256 hash of "eip1967.proxy.beacon" subtracted by 1.
*/
// solhint-disable-next-line private-vars-leading-underscore
bytes32 internal constant BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;
/**
* @dev Returns the current beacon.
*/
function getBeacon() internal view returns (address) {
return StorageSlot.getAddressSlot(BEACON_SLOT).value;
}
/**
* @dev Stores a new beacon in the EIP1967 beacon slot.
*/
function _setBeacon(address newBeacon) private {
if (newBeacon.code.length == 0) {
revert ERC1967InvalidBeacon(newBeacon);
}
StorageSlot.getAddressSlot(BEACON_SLOT).value = newBeacon;
address beaconImplementation = IBeacon(newBeacon).implementation();
if (beaconImplementation.code.length == 0) {
revert ERC1967InvalidImplementation(beaconImplementation);
}
}
/**
* @dev Change the beacon and trigger a setup call if data is nonempty.
* This function is payable only if the setup call is performed, otherwise `msg.value` is rejected
* to avoid stuck value in the contract.
*
* Emits an {IERC1967-BeaconUpgraded} event.
*
* CAUTION: Invoking this function has no effect on an instance of {BeaconProxy} since v5, since
* it uses an immutable beacon without looking at the value of the ERC-1967 beacon slot for
* efficiency.
*/
function upgradeBeaconToAndCall(address newBeacon, bytes memory data) internal {
_setBeacon(newBeacon);
emit BeaconUpgraded(newBeacon);
if (data.length > 0) {
Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);
} else {
_checkNonPayable();
}
}
/**
* @dev Reverts if `msg.value` is not zero. It can be used to avoid `msg.value` stuck in the contract
* if an upgrade doesn't perform an initialization call.
*/
function _checkNonPayable() private {
if (msg.value > 0) {
revert ERC1967NonPayable();
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (proxy/transparent/ProxyAdmin.sol)
pragma solidity ^0.8.20;
import {ITransparentUpgradeableProxy} from "./TransparentUpgradeableProxy.sol";
import {Ownable} from "../../access/Ownable.sol";
/**
* @dev This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an
* explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.
*/
contract ProxyAdmin is Ownable {
/**
* @dev The version of the upgrade interface of the contract. If this getter is missing, both `upgrade(address)`
* and `upgradeAndCall(address,bytes)` are present, and `upgradeTo` must be used if no function should be called,
* while `upgradeAndCall` will invoke the `receive` function if the second argument is the empty byte string.
* If the getter returns `"5.0.0"`, only `upgradeAndCall(address,bytes)` is present, and the second argument must
* be the empty byte string if no function should be called, making it impossible to invoke the `receive` function
* during an upgrade.
*/
string public constant UPGRADE_INTERFACE_VERSION = "5.0.0";
/**
* @dev Sets the initial owner who can perform upgrades.
*/
constructor(address initialOwner) Ownable(initialOwner) {}
/**
* @dev Upgrades `proxy` to `implementation` and calls a function on the new implementation.
* See {TransparentUpgradeableProxy-_dispatchUpgradeToAndCall}.
*
* Requirements:
*
* - This contract must be the admin of `proxy`.
* - If `data` is empty, `msg.value` must be zero.
*/
function upgradeAndCall(
ITransparentUpgradeableProxy proxy,
address implementation,
bytes memory data
) public payable virtual onlyOwner {
proxy.upgradeToAndCall{value: msg.value}(implementation, data);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (proxy/Proxy.sol)
pragma solidity ^0.8.20;
/**
* @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM
* instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to
* be specified by overriding the virtual {_implementation} function.
*
* Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a
* different contract through the {_delegate} function.
*
* The success and return data of the delegated call will be returned back to the caller of the proxy.
*/
abstract contract Proxy {
/**
* @dev Delegates the current call to `implementation`.
*
* This function does not return to its internal call site, it will return directly to the external caller.
*/
function _delegate(address implementation) internal virtual {
assembly {
// Copy msg.data. We take full control of memory in this inline assembly
// block because it will not return to Solidity code. We overwrite the
// Solidity scratch pad at memory position 0.
calldatacopy(0, 0, calldatasize())
// Call the implementation.
// out and outsize are 0 because we don't know the size yet.
let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)
// Copy the returned data.
returndatacopy(0, 0, returndatasize())
switch result
// delegatecall returns 0 on error.
case 0 {
revert(0, returndatasize())
}
default {
return(0, returndatasize())
}
}
}
/**
* @dev This is a virtual function that should be overridden so it returns the address to which the fallback
* function and {_fallback} should delegate.
*/
function _implementation() internal view virtual returns (address);
/**
* @dev Delegates the current call to the address returned by `_implementation()`.
*
* This function does not return to its internal call site, it will return directly to the external caller.
*/
function _fallback() internal virtual {
_delegate(_implementation());
}
/**
* @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other
* function in the contract matches the call data.
*/
fallback() external payable virtual {
_fallback();
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)
pragma solidity ^0.8.20;
import {Context} from "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* The initial owner is set to the address provided by the deployer. This can
* later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
/**
* @dev The caller account is not authorized to perform an operation.
*/
error OwnableUnauthorizedAccount(address account);
/**
* @dev The owner is not a valid owner account. (eg. `address(0)`)
*/
error OwnableInvalidOwner(address owner);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the address provided by the deployer as the initial owner.
*/
constructor(address initialOwner) {
if (initialOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(initialOwner);
}
/**
* @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 {
if (owner() != _msgSender()) {
revert OwnableUnauthorizedAccount(_msgSender());
}
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
if (newOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)
pragma solidity ^0.8.20;
import {ContextUpgradeable} from "../utils/ContextUpgradeable.sol";
import {Initializable} from "../proxy/utils/Initializable.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.
*
* The initial owner is set to the address provided by the deployer. 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 OwnableUpgradeable is Initializable, ContextUpgradeable {
/// @custom:storage-location erc7201:openzeppelin.storage.Ownable
struct OwnableStorage {
address _owner;
}
// keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Ownable")) - 1)) & ~bytes32(uint256(0xff))
bytes32 private constant OwnableStorageLocation = 0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300;
function _getOwnableStorage() private pure returns (OwnableStorage storage $) {
assembly {
$.slot := OwnableStorageLocation
}
}
/**
* @dev The caller account is not authorized to perform an operation.
*/
error OwnableUnauthorizedAccount(address account);
/**
* @dev The owner is not a valid owner account. (eg. `address(0)`)
*/
error OwnableInvalidOwner(address owner);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the address provided by the deployer as the initial owner.
*/
function __Ownable_init(address initialOwner) internal onlyInitializing {
__Ownable_init_unchained(initialOwner);
}
function __Ownable_init_unchained(address initialOwner) internal onlyInitializing {
if (initialOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(initialOwner);
}
/**
* @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) {
OwnableStorage storage $ = _getOwnableStorage();
return $._owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
if (owner() != _msgSender()) {
revert OwnableUnauthorizedAccount(_msgSender());
}
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
if (newOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
OwnableStorage storage $ = _getOwnableStorage();
address oldOwner = $._owner;
$._owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.sol)
pragma solidity ^0.8.20;
/**
* @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 Storage of the initializable contract.
*
* It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions
* when using with upgradeable contracts.
*
* @custom:storage-location erc7201:openzeppelin.storage.Initializable
*/
struct InitializableStorage {
/**
* @dev Indicates that the contract has been initialized.
*/
uint64 _initialized;
/**
* @dev Indicates that the contract is in the process of being initialized.
*/
bool _initializing;
}
// keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Initializable")) - 1)) & ~bytes32(uint256(0xff))
bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00;
/**
* @dev The contract is already initialized.
*/
error InvalidInitialization();
/**
* @dev The contract is not initializing.
*/
error NotInitializing();
/**
* @dev Triggered when the contract has been initialized or reinitialized.
*/
event Initialized(uint64 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 in the context of a constructor an `initializer` may be invoked any
* number of times. This behavior in the constructor can be useful during testing and is not expected to be used in
* production.
*
* Emits an {Initialized} event.
*/
modifier initializer() {
// solhint-disable-next-line var-name-mixedcase
InitializableStorage storage $ = _getInitializableStorage();
// Cache values to avoid duplicated sloads
bool isTopLevelCall = !$._initializing;
uint64 initialized = $._initialized;
// Allowed calls:
// - initialSetup: the contract is not in the initializing state and no previous version was
// initialized
// - construction: the contract is initialized at version 1 (no reininitialization) and the
// current contract is just being deployed
bool initialSetup = initialized == 0 && isTopLevelCall;
bool construction = initialized == 1 && address(this).code.length == 0;
if (!initialSetup && !construction) {
revert InvalidInitialization();
}
$._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 2**64 - 1 will prevent any future reinitialization.
*
* Emits an {Initialized} event.
*/
modifier reinitializer(uint64 version) {
// solhint-disable-next-line var-name-mixedcase
InitializableStorage storage $ = _getInitializableStorage();
if ($._initializing || $._initialized >= version) {
revert InvalidInitialization();
}
$._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() {
_checkInitializing();
_;
}
/**
* @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.
*/
function _checkInitializing() internal view virtual {
if (!_isInitializing()) {
revert NotInitializing();
}
}
/**
* @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 {
// solhint-disable-next-line var-name-mixedcase
InitializableStorage storage $ = _getInitializableStorage();
if ($._initializing) {
revert InvalidInitialization();
}
if ($._initialized != type(uint64).max) {
$._initialized = type(uint64).max;
emit Initialized(type(uint64).max);
}
}
/**
* @dev Returns the highest version that has been initialized. See {reinitializer}.
*/
function _getInitializedVersion() internal view returns (uint64) {
return _getInitializableStorage()._initialized;
}
/**
* @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.
*/
function _isInitializing() internal view returns (bool) {
return _getInitializableStorage()._initializing;
}
/**
* @dev Returns a pointer to the storage namespace.
*/
// solhint-disable-next-line var-name-mixedcase
function _getInitializableStorage() private pure returns (InitializableStorage storage $) {
assembly {
$.slot := INITIALIZABLE_STORAGE
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (proxy/beacon/IBeacon.sol)
pragma solidity ^0.8.20;
/**
* @dev This is the interface that {BeaconProxy} expects of its beacon.
*/
interface IBeacon {
/**
* @dev Must return an address that can be used as a delegate call target.
*
* {UpgradeableBeacon} will check that this address is a contract.
*/
function implementation() external view returns (address);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol)
pragma solidity ^0.8.20;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev The ETH balance of the account is not enough to perform the operation.
*/
error AddressInsufficientBalance(address account);
/**
* @dev There's no code at `target` (it is not a contract).
*/
error AddressEmptyCode(address target);
/**
* @dev A call to an address target failed. The target may have reverted.
*/
error FailedInnerCall();
/**
* @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.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
if (address(this).balance < amount) {
revert AddressInsufficientBalance(address(this));
}
(bool success, ) = recipient.call{value: amount}("");
if (!success) {
revert FailedInnerCall();
}
}
/**
* @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 or custom error, it is bubbled
* up by this function (like regular Solidity function calls). However, if
* the call reverted with no returned reason, this function reverts with a
* {FailedInnerCall} error.
*
* 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.
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0);
}
/**
* @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`.
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
if (address(this).balance < value) {
revert AddressInsufficientBalance(address(this));
}
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
* was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an
* unsuccessful call.
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata
) internal view returns (bytes memory) {
if (!success) {
_revert(returndata);
} else {
// only check if target is a contract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
if (returndata.length == 0 && target.code.length == 0) {
revert AddressEmptyCode(target);
}
return returndata;
}
}
/**
* @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
* revert reason or with a default {FailedInnerCall} error.
*/
function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
if (!success) {
_revert(returndata);
} else {
return returndata;
}
}
/**
* @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}.
*/
function _revert(bytes memory returndata) 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 FailedInnerCall();
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/StorageSlot.sol)
// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.
pragma solidity ^0.8.20;
/**
* @dev Library for reading and writing primitive types to specific storage slots.
*
* Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.
* This library helps with reading and writing to such slots without the need for inline assembly.
*
* The functions in this library return Slot structs that contain a `value` member that can be used to read or write.
*
* Example usage to set ERC1967 implementation slot:
* ```solidity
* contract ERC1967 {
* bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
*
* function _getImplementation() internal view returns (address) {
* return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
* }
*
* function _setImplementation(address newImplementation) internal {
* require(newImplementation.code.length > 0);
* StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
* }
* }
* ```
*/
library StorageSlot {
struct AddressSlot {
address value;
}
struct BooleanSlot {
bool value;
}
struct Bytes32Slot {
bytes32 value;
}
struct Uint256Slot {
uint256 value;
}
struct StringSlot {
string value;
}
struct BytesSlot {
bytes value;
}
/**
* @dev Returns an `AddressSlot` with member `value` located at `slot`.
*/
function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `BooleanSlot` with member `value` located at `slot`.
*/
function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `Bytes32Slot` with member `value` located at `slot`.
*/
function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `Uint256Slot` with member `value` located at `slot`.
*/
function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `StringSlot` with member `value` located at `slot`.
*/
function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `StringSlot` representation of the string storage pointer `store`.
*/
function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := store.slot
}
}
/**
* @dev Returns an `BytesSlot` with member `value` located at `slot`.
*/
function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.
*/
function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := store.slot
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol)
pragma solidity ^0.8.20;
/**
* @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 v5.0.0) (utils/Context.sol)
pragma solidity ^0.8.20;
import {Initializable} from "../proxy/utils/Initializable.sol";
/**
* @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 ContextUpgradeable is Initializable {
function __Context_init() internal onlyInitializing {
}
function __Context_init_unchained() internal onlyInitializing {
}
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}{
"remappings": [
"@openzeppelin-foundry-upgrades/=dependencies/openzeppelin-foundry-upgrades-0.4.0/src/",
"@openzeppelin/contracts-upgradeable/=dependencies/@openzeppelin-contracts-upgradeable-5.0.0/",
"@openzeppelin/contracts/=dependencies/@openzeppelin-contracts-5.0.0/",
"@src/=src/",
"@test/=test/",
"forge-safe/=dependencies/forge-safe/src/",
"forge-std/=dependencies/forge-std-1.9.7/src/",
"@openzeppelin-contracts-5.0.0/=dependencies/@openzeppelin-contracts-5.0.0/",
"@openzeppelin-contracts-upgradeable-5.0.0/=dependencies/@openzeppelin-contracts-upgradeable-5.0.0/",
"ds-test/=lib/openzeppelin-contracts-upgradeable/lib/forge-std/lib/ds-test/src/",
"erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",
"forge-std-1.9.7/=dependencies/forge-std-1.9.7/src/",
"openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
"openzeppelin-contracts/=lib/openzeppelin-contracts/",
"openzeppelin-foundry-upgrades-0.4.0/=dependencies/openzeppelin-foundry-upgrades-0.4.0/src/",
"openzeppelin-foundry-upgrades/=lib/openzeppelin-foundry-upgrades/src/",
"solidity-stringutils/=lib/openzeppelin-foundry-upgrades/lib/solidity-stringutils/"
],
"optimizer": {
"enabled": true,
"runs": 1
},
"metadata": {
"useLiteralContent": false,
"bytecodeHash": "ipfs",
"appendCBOR": true
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "london",
"viaIR": false
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_logic","type":"address"},{"internalType":"address","name":"_logicRegistry","type":"address"},{"internalType":"address","name":"_initialOwner","type":"address"},{"internalType":"uint256","name":"_initialDelay","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"stateMutability":"payable","type":"constructor"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"ERC1967InvalidAdmin","type":"error"},{"inputs":[{"internalType":"address","name":"implementation","type":"address"}],"name":"ERC1967InvalidImplementation","type":"error"},{"inputs":[],"name":"ERC1967NonPayable","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[],"name":"ProxyDeniedAdminAccess","type":"error"},{"inputs":[],"name":"UpdateNotAllowed","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"REGISTRY","outputs":[{"internalType":"contract LogicRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"}]Contract Creation Code
60c060405260405161161e38038061161e833981016040819052610022916104cd565b61002c85856100ab565b8161003782826101c0565b505082826040516100479061046a565b6001600160a01b0390921682526020820152604001604051809103906000f080158015610078573d6000803e3d6000fd5b506001600160a01b031660805261009661009160805190565b61021f565b5050506001600160a01b031660a05250610645565b60006001600160a01b03831661012457816001600160a01b03166345f55b3c6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061011d91906105be565b90506101ba565b6001600160a01b03821663f3c665f761013b61026b565b856040518363ffffffff1660e01b81526004016101599291906105d9565b602060405180830381865afa158015610176573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061019a91906105f3565b6101b75760405163474245d760e11b815260040160405180910390fd5b50815b92915050565b6101c98261028b565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28051156102135761020e82826102f3565b505050565b61021b61036a565b5050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61024861038b565b826040516102579291906105d9565b60405180910390a1610268816103ac565b50565b600061028660006000805160206115fe83398151915261039d565b905090565b806001600160a01b03163b6000036102c15780604051634c9c8ce360e01b81526004016102b89190610615565b60405180910390fd5b806000805160206115fe8339815191525b80546001600160a01b0319166001600160a01b039290921691909117905550565b6060600080846001600160a01b0316846040516103109190610629565b600060405180830381855af49150503d806000811461034b576040519150601f19603f3d011682016040523d82523d6000602084013e610350565b606091505b5090925090506103618583836103eb565b95945050505050565b34156103895760405163b398979f60e01b815260040160405180910390fd5b565b60006000805160206115de8339815191525b546001600160a01b0316919050565b6001600160a01b0381166103d6576000604051633173bdd160e11b81526004016102b89190610615565b806000805160206115de8339815191526102d2565b606082610400576103fb82610441565b61043a565b815115801561041757506001600160a01b0384163b155b156104375783604051639996b31560e01b81526004016102b89190610615565b50805b9392505050565b8051156104515780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b6109a080610c3e83390190565b80516001600160a01b038116811461048e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b838110156104c45781810151838201526020016104ac565b50506000910152565b600080600080600060a086880312156104e557600080fd5b6104ee86610477565b94506104fc60208701610477565b935061050a60408701610477565b6060870151608088015191945092506001600160401b0381111561052d57600080fd5b8601601f8101881361053e57600080fd5b80516001600160401b0381111561055757610557610493565b604051601f8201601f19908116603f011681016001600160401b038111828210171561058557610585610493565b6040528181528282016020018a101561059d57600080fd5b6105ae8260208301602086016104a9565b8093505050509295509295909350565b6000602082840312156105d057600080fd5b61043a82610477565b6001600160a01b0392831681529116602082015260400190565b60006020828403121561060557600080fd5b8151801515811461043a57600080fd5b6001600160a01b0391909116815260200190565b6000825161063b8184602087016104a9565b9190910192915050565b60805160a0516105d061066e60003960008181603a015260f801526000607401526105d06000f3fe60806040526004361061001e5760003560e01c806306433b1b14610028575b610026610072565b005b34801561003457600080fd5b5061005c7f000000000000000000000000000000000000000000000000000000000000000081565b6040516100699190610400565b60405180910390f35b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031633036101c8576000356001600160e01b03191663278f794360e11b146100d5576040516334ad5dbb60e21b815260040160405180910390fd5b6000806100e53660048184610414565b8101906100f29190610454565b915091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663f3c665f761012d6101d2565b6040516001600160e01b031960e084901b1681526001600160a01b0391821660048201529085166024820152604401602060405180830381865afa158015610179573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061019d9190610529565b6101ba5760405163474245d760e11b815260040160405180910390fd5b6101c482826101f8565b5050565b6101d0610253565b565b60006101f360008051602061057b833981519152546001600160a01b031690565b905090565b61020182610263565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a280511561024b5761024682826102c8565b505050565b6101c461033e565b6101d061025e6101d2565b61035d565b806001600160a01b03163b6000036102995780604051634c9c8ce360e01b81526004016102909190610400565b60405180910390fd5b60008051602061057b83398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b0316846040516102e5919061054b565b600060405180830381855af49150503d8060008114610320576040519150601f19603f3d011682016040523d82523d6000602084013e610325565b606091505b5091509150610335858383610381565b95945050505050565b34156101d05760405163b398979f60e01b815260040160405180910390fd5b3660008037600080366000845af43d6000803e80801561037c573d6000f35b3d6000fd5b60608261039657610391826103d7565b6103d0565b81511580156103ad57506001600160a01b0384163b155b156103cd5783604051639996b31560e01b81526004016102909190610400565b50805b9392505050565b8051156103e75780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b6001600160a01b0391909116815260200190565b6000808585111561042457600080fd5b8386111561043157600080fd5b5050820193919092039150565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561046757600080fd5b82356001600160a01b038116811461047e57600080fd5b915060208301356001600160401b0381111561049957600080fd5b8301601f810185136104aa57600080fd5b80356001600160401b038111156104c3576104c361043e565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104f1576104f161043e565b60405281815282820160200187101561050957600080fd5b816020840160208301376000602083830101528093505050509250929050565b60006020828403121561053b57600080fd5b815180151581146103d057600080fd5b6000825160005b8181101561056c5760208186018101518583015201610552565b50600092019182525091905056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220e0e67718c41b4c4f0adfad5dffe27f61d73d4106d6c796e4bf9c6806d16d6cd564736f6c634300081a0033608060405234801561001057600080fd5b506040516109a03803806109a083398101604081905261002f9161015d565b81806001600160a01b03811661006057604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b6100698161010d565b5050620151808110156100945760405163013ccc8d60e01b8152620151806004820152602401610057565b62278d008111156100bd57604051630b94129b60e31b815262278d006004820152602401610057565b6000196001819055600355600581905560408051828152600060208201527fa580b4a9812995ffed1b336481c3f3bfeb3414df9f587a9d73856bab25aa4eee910160405180910390a15050610197565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000806040838503121561017057600080fd5b82516001600160a01b038116811461018757600080fd5b6020939093015192949293505050565b6107fa806101a66000396000f3fe6080604052600436106100b85760003560e01c8063033f8dbc146100bd5780634125ff90146100e6578063432efade146100fd578063554f94db1461011f578063657081b3146101345780636a42b8f814610154578063715018a61461016a5780638b677b031461017f5780638da5cb5b146101ac5780639623609d146101c15780639f81aed7146101d4578063a36f141c146101eb578063ad3cb1cc14610201578063f2fde38b1461023f578063f6b12cf91461025f575b600080fd5b3480156100c957600080fd5b506100d360045481565b6040519081526020015b60405180910390f35b3480156100f257600080fd5b506100d362278d0081565b34801561010957600080fd5b5061011d6101183660046105c1565b610275565b005b34801561012b57600080fd5b5061011d610336565b34801561014057600080fd5b5061011d61014f3660046105ef565b6103ba565b34801561016057600080fd5b506100d360055481565b34801561017657600080fd5b5061011d610432565b34801561018b57600080fd5b5060025461019f906001600160a01b031681565b6040516100dd9190610613565b3480156101b857600080fd5b5061019f610446565b61011d6101cf36600461063d565b610455565b3480156101e057600080fd5b506100d36201518081565b3480156101f757600080fd5b506100d360035481565b34801561020d57600080fd5b50610232604051806040016040528060058152602001640352e302e360dc1b81525081565b6040516100dd919061075e565b34801561024b57600080fd5b5061011d61025a3660046105ef565b610501565b34801561026b57600080fd5b506100d360015481565b61027d61053f565b620151808110156102ab5760405163013ccc8d60e01b81526201518060048201526024015b60405180910390fd5b62278d008111156102d457604051630b94129b60e31b815262278d0060048201526024016102a2565b60048190556005546102e69042610771565b60038190556005546004546040805192835260208301919091528101919091527fab7d3921ca5710b1f874b995128f2d434b8b28080cc90e5b7ae542d01a41dd6e9060600160405180910390a150565b61033e61053f565b60035442101561036157604051634040f3a760e01b815260040160405180910390fd5b7fa580b4a9812995ffed1b336481c3f3bfeb3414df9f587a9d73856bab25aa4eee60045460055460405161039f929190918252602082015260400190565b60405180910390a16004805460055560009055600019600355565b6103c261053f565b600280546001600160a01b0319166001600160a01b0383161790556005546103ea9042610771565b60018190556002546040519182526001600160a01b0316907fb995d606597d17deae0e0b28f4668c00c67c22d7bed7b95db2a5ac7f1b96aa2b9060200160405180910390a250565b61043a61053f565b6104446000610571565b565b6000546001600160a01b031690565b61045d61053f565b60015442101561048057604051634040f3a760e01b815260040160405180910390fd5b60025460405163278f794360e11b81526001600160a01b0380861692634f1ef2869234926104b49216908690600401610798565b6000604051808303818588803b1580156104cd57600080fd5b505af11580156104e1573d6000803e3d6000fd5b5050600280546001600160a01b0319169055505060001960015550505050565b61050961053f565b6001600160a01b038116610533576000604051631e4fbdf760e01b81526004016102a29190610613565b61053c81610571565b50565b33610548610446565b6001600160a01b031614610444573360405163118cdaa760e01b81526004016102a29190610613565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156105d357600080fd5b5035919050565b6001600160a01b038116811461053c57600080fd5b60006020828403121561060157600080fd5b813561060c816105da565b9392505050565b6001600160a01b0391909116815260200190565b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561065257600080fd5b833561065d816105da565b9250602084013561066d816105da565b915060408401356001600160401b0381111561068857600080fd5b8401601f8101861361069957600080fd5b80356001600160401b038111156106b2576106b2610627565b604051601f8201601f19908116603f011681016001600160401b03811182821017156106e0576106e0610627565b6040528181528282016020018810156106f857600080fd5b816020840160208301376000602083830101528093505050509250925092565b6000815180845260005b8181101561073e57602081850181015186830182015201610722565b506000602082860101526020601f19601f83011685010191505092915050565b60208152600061060c6020830184610718565b8082018082111561079257634e487b7160e01b600052601160045260246000fd5b92915050565b6001600160a01b03831681526040602082018190526000906107bc90830184610718565b94935050505056fea2646970667358221220fc1ea3207ebd7e55b1fb64eefc7d93cbaee6f33c132f3c0db72f5e3f4b2eef1f64736f6c634300081a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c81dd51239119db80d5a6e1b7347f3c3bc8674d90000000000000000000000008477f908f299ad0339792ebc406c5d99002350fe000000000000000000000000000000000000000000000000000000000001518000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000002a4660b88ee0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000c81dd51239119db80d5a6e1b7347f3c3bc8674d9000000000000000000000000e5d7c2a44ffddf6b295a15c148167daaaf5cf34f00000000000000000000000000000000000000000000000000000000000002200000000000000000000000000000000000000000000000000000000000000020000000000000000000000000176211869ca2b568f2a7d4ee941e073a821ee1ff000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000001c00000000000000000000000008477f908f299ad0339792ebc406c5d99002350fe0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d1ff17f544d7ca5138c25874b16ef801ac1138820000000000000000000000008477f908f299ad0339792ebc406c5d99002350fe0000000000000000000000006ff36f81e326e7e5117eba37a6bfce9a44d17177000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011547572746c65204c696e65612055534443000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f747572746c654c696e656155534443000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x60806040526004361061001e5760003560e01c806306433b1b14610028575b610026610072565b005b34801561003457600080fd5b5061005c7f000000000000000000000000c81dd51239119db80d5a6e1b7347f3c3bc8674d981565b6040516100699190610400565b60405180910390f35b7f0000000000000000000000006b8365919619c9590b68106c88b3bc0465d2cd086001600160a01b031633036101c8576000356001600160e01b03191663278f794360e11b146100d5576040516334ad5dbb60e21b815260040160405180910390fd5b6000806100e53660048184610414565b8101906100f29190610454565b915091507f000000000000000000000000c81dd51239119db80d5a6e1b7347f3c3bc8674d96001600160a01b031663f3c665f761012d6101d2565b6040516001600160e01b031960e084901b1681526001600160a01b0391821660048201529085166024820152604401602060405180830381865afa158015610179573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061019d9190610529565b6101ba5760405163474245d760e11b815260040160405180910390fd5b6101c482826101f8565b5050565b6101d0610253565b565b60006101f360008051602061057b833981519152546001600160a01b031690565b905090565b61020182610263565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a280511561024b5761024682826102c8565b505050565b6101c461033e565b6101d061025e6101d2565b61035d565b806001600160a01b03163b6000036102995780604051634c9c8ce360e01b81526004016102909190610400565b60405180910390fd5b60008051602061057b83398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b0316846040516102e5919061054b565b600060405180830381855af49150503d8060008114610320576040519150601f19603f3d011682016040523d82523d6000602084013e610325565b606091505b5091509150610335858383610381565b95945050505050565b34156101d05760405163b398979f60e01b815260040160405180910390fd5b3660008037600080366000845af43d6000803e80801561037c573d6000f35b3d6000fd5b60608261039657610391826103d7565b6103d0565b81511580156103ad57506001600160a01b0384163b155b156103cd5783604051639996b31560e01b81526004016102909190610400565b50805b9392505050565b8051156103e75780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b6001600160a01b0391909116815260200190565b6000808585111561042457600080fd5b8386111561043157600080fd5b5050820193919092039150565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561046757600080fd5b82356001600160a01b038116811461047e57600080fd5b915060208301356001600160401b0381111561049957600080fd5b8301601f810185136104aa57600080fd5b80356001600160401b038111156104c3576104c361043e565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104f1576104f161043e565b60405281815282820160200187101561050957600080fd5b816020840160208301376000602083830101528093505050509250929050565b60006020828403121561053b57600080fd5b815180151581146103d057600080fd5b6000825160005b8181101561056c5760208186018101518583015201610552565b50600092019182525091905056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220e0e67718c41b4c4f0adfad5dffe27f61d73d4106d6c796e4bf9c6806d16d6cd564736f6c634300081a0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c81dd51239119db80d5a6e1b7347f3c3bc8674d90000000000000000000000008477f908f299ad0339792ebc406c5d99002350fe000000000000000000000000000000000000000000000000000000000001518000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000002a4660b88ee0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000c81dd51239119db80d5a6e1b7347f3c3bc8674d9000000000000000000000000e5d7c2a44ffddf6b295a15c148167daaaf5cf34f00000000000000000000000000000000000000000000000000000000000002200000000000000000000000000000000000000000000000000000000000000020000000000000000000000000176211869ca2b568f2a7d4ee941e073a821ee1ff000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000001c00000000000000000000000008477f908f299ad0339792ebc406c5d99002350fe0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d1ff17f544d7ca5138c25874b16ef801ac1138820000000000000000000000008477f908f299ad0339792ebc406c5d99002350fe0000000000000000000000006ff36f81e326e7e5117eba37a6bfce9a44d17177000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011547572746c65204c696e65612055534443000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f747572746c654c696e656155534443000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _logic (address): 0x0000000000000000000000000000000000000000
Arg [1] : _logicRegistry (address): 0xC81Dd51239119Db80D5a6E1B7347F3C3BC8674d9
Arg [2] : _initialOwner (address): 0x8477F908F299aD0339792eBc406c5d99002350Fe
Arg [3] : _initialDelay (uint256): 86400
Arg [4] : _data (bytes): 0x660b88ee0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000c81dd51239119db80d5a6e1b7347f3c3bc8674d9000000000000000000000000e5d7c2a44ffddf6b295a15c148167daaaf5cf34f00000000000000000000000000000000000000000000000000000000000002200000000000000000000000000000000000000000000000000000000000000020000000000000000000000000176211869ca2b568f2a7d4ee941e073a821ee1ff000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000001c00000000000000000000000008477f908f299ad0339792ebc406c5d99002350fe0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d1ff17f544d7ca5138c25874b16ef801ac1138820000000000000000000000008477f908f299ad0339792ebc406c5d99002350fe0000000000000000000000006ff36f81e326e7e5117eba37a6bfce9a44d17177000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011547572746c65204c696e65612055534443000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f747572746c654c696e6561555344430000000000000000000000000000000000
-----Encoded View---------------
28 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [1] : 000000000000000000000000c81dd51239119db80d5a6e1b7347f3c3bc8674d9
Arg [2] : 0000000000000000000000008477f908f299ad0339792ebc406c5d99002350fe
Arg [3] : 0000000000000000000000000000000000000000000000000000000000015180
Arg [4] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [5] : 00000000000000000000000000000000000000000000000000000000000002a4
Arg [6] : 660b88ee00000000000000000000000000000000000000000000000000000000
Arg [7] : 00000060000000000000000000000000c81dd51239119db80d5a6e1b7347f3c3
Arg [8] : bc8674d9000000000000000000000000e5d7c2a44ffddf6b295a15c148167daa
Arg [9] : af5cf34f00000000000000000000000000000000000000000000000000000000
Arg [10] : 0000022000000000000000000000000000000000000000000000000000000000
Arg [11] : 00000020000000000000000000000000176211869ca2b568f2a7d4ee941e073a
Arg [12] : 821ee1ff00000000000000000000000000000000000000000000000000000000
Arg [13] : 0000018000000000000000000000000000000000000000000000000000000000
Arg [14] : 000001c00000000000000000000000008477f908f299ad0339792ebc406c5d99
Arg [15] : 002350fe00000000000000000000000000000000000000000000000000000000
Arg [16] : 00000000000000000000000000000000d1ff17f544d7ca5138c25874b16ef801
Arg [17] : ac1138820000000000000000000000008477f908f299ad0339792ebc406c5d99
Arg [18] : 002350fe0000000000000000000000006ff36f81e326e7e5117eba37a6bfce9a
Arg [19] : 44d1717700000000000000000000000000000000000000000000000000000000
Arg [20] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [21] : 000007d000000000000000000000000000000000000000000000000000000000
Arg [22] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [23] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [24] : 00000011547572746c65204c696e656120555344430000000000000000000000
Arg [25] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [26] : 0000000f747572746c654c696e65615553444300000000000000000000000000
Arg [27] : 0000000000000000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$7,939.18
Net Worth in ETH
Token Allocations
USDC
100.00%
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|---|---|---|---|---|
| LINEA | 100.00% | $0.999789 | 7,940.8543 | $7,939.18 |
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.