Feature Tip: Add private address tag to any address under My Name Tag !
Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00Latest 1 from a total of 1 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Set Fee Recipien... | 22631168 | 270 days ago | IN | 0 ETH | 0.00007946 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
SSVNetworkUpgradeValidatorsPerOperator
Compiler Version
v0.8.24+commit.e11b9ed9
Optimization Enabled:
Yes with 10000 runs
Other Settings:
cancun EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.24;
import "../../SSVNetwork.sol";
contract SSVNetworkUpgradeValidatorsPerOperator is SSVNetwork {
function initializev2(uint32 validatorsPerOperatorLimit_) external reinitializer(_getInitializedVersion() + 1) {
SSVStorageProtocol.load().validatorsPerOperatorLimit = validatorsPerOperatorLimit_;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable2Step.sol)
pragma solidity ^0.8.0;
import "./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.
*
* By default, the owner account will be the one that deploys the contract. 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 {
address private _pendingOwner;
event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner);
function __Ownable2Step_init() internal onlyInitializing {
__Ownable_init_unchained();
}
function __Ownable2Step_init_unchained() internal onlyInitializing {
}
/**
* @dev Returns the address of the pending owner.
*/
function pendingOwner() public view virtual returns (address) {
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 {
_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 {
delete _pendingOwner;
super._transferOwnership(newOwner);
}
/**
* @dev The new owner accepts the ownership transfer.
*/
function acceptOwnership() public virtual {
address sender = _msgSender();
require(pendingOwner() == sender, "Ownable2Step: caller is not the new owner");
_transferOwnership(sender);
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[49] private __gap;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../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.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
function __Ownable_init() internal onlyInitializing {
__Ownable_init_unchained();
}
function __Ownable_init_unchained() internal onlyInitializing {
_transferOwnership(_msgSender());
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[49] private __gap;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)
pragma solidity ^0.8.0;
/**
* @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified
* proxy whose upgrades are fully controlled by the current implementation.
*/
interface IERC1822ProxiableUpgradeable {
/**
* @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation
* address.
*
* IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks
* bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this
* function revert if invoked through a proxy.
*/
function proxiableUUID() external view returns (bytes32);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC1967.sol)
pragma solidity ^0.8.0;
/**
* @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC.
*
* _Available since v4.8.3._
*/
interface IERC1967Upgradeable {
/**
* @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 v4.4.1 (proxy/beacon/IBeacon.sol)
pragma solidity ^0.8.0;
/**
* @dev This is the interface that {BeaconProxy} expects of its beacon.
*/
interface IBeaconUpgradeable {
/**
* @dev Must return an address that can be used as a delegate call target.
*
* {BeaconProxy} will check that this address is a contract.
*/
function implementation() external view returns (address);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (proxy/ERC1967/ERC1967Upgrade.sol)
pragma solidity ^0.8.2;
import "../beacon/IBeaconUpgradeable.sol";
import "../../interfaces/IERC1967Upgradeable.sol";
import "../../interfaces/draft-IERC1822Upgradeable.sol";
import "../../utils/AddressUpgradeable.sol";
import "../../utils/StorageSlotUpgradeable.sol";
import {Initializable} from "../utils/Initializable.sol";
/**
* @dev This abstract contract provides getters and event emitting update functions for
* https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.
*
* _Available since v4.1._
*/
abstract contract ERC1967UpgradeUpgradeable is Initializable, IERC1967Upgradeable {
// This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1
bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;
/**
* @dev Storage slot with the address of the current implementation.
* This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is
* validated in the constructor.
*/
bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
function __ERC1967Upgrade_init() internal onlyInitializing {
}
function __ERC1967Upgrade_init_unchained() internal onlyInitializing {
}
/**
* @dev Returns the current implementation address.
*/
function _getImplementation() internal view returns (address) {
return StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value;
}
/**
* @dev Stores a new address in the EIP1967 implementation slot.
*/
function _setImplementation(address newImplementation) private {
require(AddressUpgradeable.isContract(newImplementation), "ERC1967: new implementation is not a contract");
StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
}
/**
* @dev Perform implementation upgrade
*
* Emits an {Upgraded} event.
*/
function _upgradeTo(address newImplementation) internal {
_setImplementation(newImplementation);
emit Upgraded(newImplementation);
}
/**
* @dev Perform implementation upgrade with additional setup call.
*
* Emits an {Upgraded} event.
*/
function _upgradeToAndCall(address newImplementation, bytes memory data, bool forceCall) internal {
_upgradeTo(newImplementation);
if (data.length > 0 || forceCall) {
AddressUpgradeable.functionDelegateCall(newImplementation, data);
}
}
/**
* @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.
*
* Emits an {Upgraded} event.
*/
function _upgradeToAndCallUUPS(address newImplementation, bytes memory data, bool forceCall) internal {
// Upgrades from old implementations will perform a rollback test. This test requires the new
// implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing
// this special case will break upgrade paths from old UUPS implementation to new ones.
if (StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT).value) {
_setImplementation(newImplementation);
} else {
try IERC1822ProxiableUpgradeable(newImplementation).proxiableUUID() returns (bytes32 slot) {
require(slot == _IMPLEMENTATION_SLOT, "ERC1967Upgrade: unsupported proxiableUUID");
} catch {
revert("ERC1967Upgrade: new implementation is not UUPS");
}
_upgradeToAndCall(newImplementation, data, forceCall);
}
}
/**
* @dev Storage slot with the admin of the contract.
* This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is
* validated in the constructor.
*/
bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;
/**
* @dev Returns the current admin.
*/
function _getAdmin() internal view returns (address) {
return StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value;
}
/**
* @dev Stores a new address in the EIP1967 admin slot.
*/
function _setAdmin(address newAdmin) private {
require(newAdmin != address(0), "ERC1967: new admin is the zero address");
StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value = newAdmin;
}
/**
* @dev Changes the admin of the proxy.
*
* Emits an {AdminChanged} event.
*/
function _changeAdmin(address newAdmin) internal {
emit AdminChanged(_getAdmin(), newAdmin);
_setAdmin(newAdmin);
}
/**
* @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.
* This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.
*/
bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;
/**
* @dev Returns the current beacon.
*/
function _getBeacon() internal view returns (address) {
return StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value;
}
/**
* @dev Stores a new beacon in the EIP1967 beacon slot.
*/
function _setBeacon(address newBeacon) private {
require(AddressUpgradeable.isContract(newBeacon), "ERC1967: new beacon is not a contract");
require(
AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),
"ERC1967: beacon implementation is not a contract"
);
StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value = newBeacon;
}
/**
* @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does
* not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).
*
* Emits a {BeaconUpgraded} event.
*/
function _upgradeBeaconToAndCall(address newBeacon, bytes memory data, bool forceCall) internal {
_setBeacon(newBeacon);
emit BeaconUpgraded(newBeacon);
if (data.length > 0 || forceCall) {
AddressUpgradeable.functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);
}
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[50] private __gap;
}// 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;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/UUPSUpgradeable.sol)
pragma solidity ^0.8.0;
import "../../interfaces/draft-IERC1822Upgradeable.sol";
import "../ERC1967/ERC1967UpgradeUpgradeable.sol";
import {Initializable} from "./Initializable.sol";
/**
* @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an
* {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.
*
* A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is
* reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing
* `UUPSUpgradeable` with a custom implementation of upgrades.
*
* The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.
*
* _Available since v4.1._
*/
abstract contract UUPSUpgradeable is Initializable, IERC1822ProxiableUpgradeable, ERC1967UpgradeUpgradeable {
/// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment
address private immutable __self = address(this);
/**
* @dev Check that the execution is being performed through a delegatecall call and that the execution context is
* a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case
* for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a
* function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to
* fail.
*/
modifier onlyProxy() {
require(address(this) != __self, "Function must be called through delegatecall");
require(_getImplementation() == __self, "Function must be called through active proxy");
_;
}
/**
* @dev Check that the execution is not being performed through a delegate call. This allows a function to be
* callable on the implementing contract but not through proxies.
*/
modifier notDelegated() {
require(address(this) == __self, "UUPSUpgradeable: must not be called through delegatecall");
_;
}
function __UUPSUpgradeable_init() internal onlyInitializing {
}
function __UUPSUpgradeable_init_unchained() internal onlyInitializing {
}
/**
* @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the
* implementation. It is used to validate the implementation's compatibility when performing an upgrade.
*
* IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks
* bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this
* function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.
*/
function proxiableUUID() external view virtual override notDelegated returns (bytes32) {
return _IMPLEMENTATION_SLOT;
}
/**
* @dev Upgrade the implementation of the proxy to `newImplementation`.
*
* Calls {_authorizeUpgrade}.
*
* Emits an {Upgraded} event.
*
* @custom:oz-upgrades-unsafe-allow-reachable delegatecall
*/
function upgradeTo(address newImplementation) public virtual onlyProxy {
_authorizeUpgrade(newImplementation);
_upgradeToAndCallUUPS(newImplementation, new bytes(0), false);
}
/**
* @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call
* encoded in `data`.
*
* Calls {_authorizeUpgrade}.
*
* Emits an {Upgraded} event.
*
* @custom:oz-upgrades-unsafe-allow-reachable delegatecall
*/
function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual onlyProxy {
_authorizeUpgrade(newImplementation);
_upgradeToAndCallUUPS(newImplementation, data, true);
}
/**
* @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by
* {upgradeTo} and {upgradeToAndCall}.
*
* Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.
*
* ```solidity
* function _authorizeUpgrade(address) internal override onlyOwner {}
* ```
*/
function _authorizeUpgrade(address newImplementation) internal virtual;
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[50] private __gap;
}// 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);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)
pragma solidity ^0.8.0;
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;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[50] private __gap;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol)
// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.
pragma solidity ^0.8.0;
/**
* @dev Library for reading and writing primitive types to specific storage slots.
*
* Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.
* This library helps with reading and writing to such slots without the need for inline assembly.
*
* The functions in this library return Slot structs that contain a `value` member that can be used to read or write.
*
* Example usage to set ERC1967 implementation slot:
* ```solidity
* contract ERC1967 {
* bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
*
* function _getImplementation() internal view returns (address) {
* return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
* }
*
* function _setImplementation(address newImplementation) internal {
* require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract");
* StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
* }
* }
* ```
*
* _Available since v4.1 for `address`, `bool`, `bytes32`, `uint256`._
* _Available since v4.9 for `string`, `bytes`._
*/
library StorageSlotUpgradeable {
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 v4.9.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `from` to `to` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 amount) external returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)
pragma solidity ^0.8.0;
/**
* @title Counters
* @author Matt Condon (@shrugs)
* @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
* of elements in a mapping, issuing ERC721 ids, or counting request ids.
*
* Include with `using Counters for Counters.Counter;`
*/
library Counters {
struct Counter {
// This variable should never be directly accessed by users of the library: interactions must be restricted to
// the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
// this feature: see https://github.com/ethereum/solidity/issues/4637
uint256 _value; // default: 0
}
function current(Counter storage counter) internal view returns (uint256) {
return counter._value;
}
function increment(Counter storage counter) internal {
unchecked {
counter._value += 1;
}
}
function decrement(Counter storage counter) internal {
uint256 value = counter._value;
require(value > 0, "Counter: decrement overflow");
unchecked {
counter._value = value - 1;
}
}
function reset(Counter storage counter) internal {
counter._value = 0;
}
}// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.20;
interface ISSVWhitelistingContract {
/// @notice Checks if the caller is whitelisted
/// @param account The account that is being checked for whitelisting
/// @param operatorId The SSV Operator Id which is being checked
function isWhitelisted(address account, uint256 operatorId) external view returns (bool);
}// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.20;
import {ISSVNetworkCore} from "./ISSVNetworkCore.sol";
interface ISSVClusters is ISSVNetworkCore {
/// @notice Registers a new validator on the SSV Network
/// @param publicKey The public key of the new validator
/// @param operatorIds Array of IDs of operators managing this validator
/// @param sharesData Encrypted shares related to the new validator
/// @param amount Amount of SSV tokens to be deposited
/// @param cluster Cluster to be used with the new validator
function registerValidator(
bytes calldata publicKey,
uint64[] memory operatorIds,
bytes calldata sharesData,
uint256 amount,
Cluster memory cluster
) external;
/// @notice Registers new validators on the SSV Network
/// @param publicKeys The public keys of the new validators
/// @param operatorIds Array of IDs of operators managing this validator
/// @param sharesData Encrypted shares related to the new validators
/// @param amount Amount of SSV tokens to be deposited
/// @param cluster Cluster to be used with the new validator
function bulkRegisterValidator(
bytes[] calldata publicKeys,
uint64[] memory operatorIds,
bytes[] calldata sharesData,
uint256 amount,
Cluster memory cluster
) external;
/// @notice Removes an existing validator from the SSV Network
/// @param publicKey The public key of the validator to be removed
/// @param operatorIds Array of IDs of operators managing the validator
/// @param cluster Cluster associated with the validator
function removeValidator(bytes calldata publicKey, uint64[] memory operatorIds, Cluster memory cluster) external;
/// @notice Bulk removes a set of existing validators in the same cluster from the SSV Network
/// @notice Reverts if publicKeys contains duplicates or non-existent validators
/// @param publicKeys The public keys of the validators to be removed
/// @param operatorIds Array of IDs of operators managing the validator
/// @param cluster Cluster associated with the validator
function bulkRemoveValidator(
bytes[] calldata publicKeys,
uint64[] memory operatorIds,
Cluster memory cluster
) external;
/**************************/
/* Cluster External Functions */
/**************************/
/// @notice Liquidates a cluster
/// @param owner The owner of the cluster
/// @param operatorIds Array of IDs of operators managing the cluster
/// @param cluster Cluster to be liquidated
function liquidate(address owner, uint64[] memory operatorIds, Cluster memory cluster) external;
/// @notice Reactivates a cluster
/// @param operatorIds Array of IDs of operators managing the cluster
/// @param amount Amount of SSV tokens to be deposited for reactivation
/// @param cluster Cluster to be reactivated
function reactivate(uint64[] memory operatorIds, uint256 amount, Cluster memory cluster) external;
/******************************/
/* Balance External Functions */
/******************************/
/// @notice Deposits tokens into a cluster
/// @param owner The owner of the cluster
/// @param operatorIds Array of IDs of operators managing the cluster
/// @param amount Amount of SSV tokens to be deposited
/// @param cluster Cluster where the deposit will be made
function deposit(address owner, uint64[] memory operatorIds, uint256 amount, Cluster memory cluster) external;
/// @notice Withdraws tokens from a cluster
/// @param operatorIds Array of IDs of operators managing the cluster
/// @param tokenAmount Amount of SSV tokens to be withdrawn
/// @param cluster Cluster where the withdrawal will be made
function withdraw(uint64[] memory operatorIds, uint256 tokenAmount, Cluster memory cluster) external;
/// @notice Fires the exit event for a validator
/// @param publicKey The public key of the validator to be exited
/// @param operatorIds Array of IDs of operators managing the validator
function exitValidator(bytes calldata publicKey, uint64[] calldata operatorIds) external;
/// @notice Fires the exit event for a set of validators
/// @param publicKeys The public keys of the validators to be exited
/// @param operatorIds Array of IDs of operators managing the validators
function bulkExitValidator(bytes[] calldata publicKeys, uint64[] calldata operatorIds) external;
/**
* @dev Emitted when the validator has been added.
* @param publicKey The public key of a validator.
* @param operatorIds The operator ids list.
* @param shares snappy compressed shares(a set of encrypted and public shares).
* @param cluster All the cluster data.
*/
event ValidatorAdded(address indexed owner, uint64[] operatorIds, bytes publicKey, bytes shares, Cluster cluster);
/**
* @dev Emitted when the validator is removed.
* @param publicKey The public key of a validator.
* @param operatorIds The operator ids list.
* @param cluster All the cluster data.
*/
event ValidatorRemoved(address indexed owner, uint64[] operatorIds, bytes publicKey, Cluster cluster);
/**
* @dev Emitted when a cluster is liquidated.
* @param owner The owner of the liquidated cluster.
* @param operatorIds The operator IDs managing the cluster.
* @param cluster The liquidated cluster data.
*/
event ClusterLiquidated(address indexed owner, uint64[] operatorIds, Cluster cluster);
/**
* @dev Emitted when a cluster is reactivated.
* @param owner The owner of the reactivated cluster.
* @param operatorIds The operator IDs managing the cluster.
* @param cluster The reactivated cluster data.
*/
event ClusterReactivated(address indexed owner, uint64[] operatorIds, Cluster cluster);
/**
* @dev Emitted when tokens are withdrawn from a cluster.
* @param owner The owner of the cluster.
* @param operatorIds The operator IDs managing the cluster.
* @param value The amount of tokens withdrawn.
* @param cluster The cluster from which tokens were withdrawn.
*/
event ClusterWithdrawn(address indexed owner, uint64[] operatorIds, uint256 value, Cluster cluster);
/**
* @dev Emitted when tokens are deposited into a cluster.
* @param owner The owner of the cluster.
* @param operatorIds The operator IDs managing the cluster.
* @param value The amount of SSV tokens deposited.
* @param cluster The cluster into which SSV tokens were deposited.
*/
event ClusterDeposited(address indexed owner, uint64[] operatorIds, uint256 value, Cluster cluster);
/**
* @dev Emitted when a validator begins the exit process.
* @param owner The owner of the exiting validator.
* @param operatorIds The operator IDs managing the validator.
* @param publicKey The public key of the exiting validator.
*/
event ValidatorExited(address indexed owner, uint64[] operatorIds, bytes publicKey);
}// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.20;
import {ISSVNetworkCore} from "./ISSVNetworkCore.sol";
interface ISSVDAO is ISSVNetworkCore {
/// @notice Updates the network fee
/// @param fee The new network fee (SSV) to be set
function updateNetworkFee(uint256 fee) external;
/// @notice Withdraws network earnings
/// @param amount The amount (SSV) to be withdrawn
function withdrawNetworkEarnings(uint256 amount) external;
/// @notice Updates the limit on the percentage increase in operator fees
/// @param percentage The new percentage limit
function updateOperatorFeeIncreaseLimit(uint64 percentage) external;
/// @notice Updates the period for declaring operator fees
/// @param timeInSeconds The new period in seconds
function updateDeclareOperatorFeePeriod(uint64 timeInSeconds) external;
/// @notice Updates the period for executing operator fees
/// @param timeInSeconds The new period in seconds
function updateExecuteOperatorFeePeriod(uint64 timeInSeconds) external;
/// @notice Updates the liquidation threshold period
/// @param blocks The new liquidation threshold in blocks
function updateLiquidationThresholdPeriod(uint64 blocks) external;
/// @notice Updates the minimum collateral required to prevent liquidation
/// @param amount The new minimum collateral amount (SSV)
function updateMinimumLiquidationCollateral(uint256 amount) external;
/// @notice Updates the maximum fee an operator that uses SSV token can set
/// @param maxFee The new maximum fee (SSV)
function updateMaximumOperatorFee(uint64 maxFee) external;
event OperatorFeeIncreaseLimitUpdated(uint64 value);
event DeclareOperatorFeePeriodUpdated(uint64 value);
event ExecuteOperatorFeePeriodUpdated(uint64 value);
event LiquidationThresholdPeriodUpdated(uint64 value);
event MinimumLiquidationCollateralUpdated(uint256 value);
/**
* @dev Emitted when the network fee is updated.
* @param oldFee The old fee
* @param newFee The new fee
*/
event NetworkFeeUpdated(uint256 oldFee, uint256 newFee);
/**
* @dev Emitted when transfer fees are withdrawn.
* @param value The amount of tokens withdrawn.
* @param recipient The recipient address.
*/
event NetworkEarningsWithdrawn(uint256 value, address recipient);
event OperatorMaximumFeeUpdated(uint64 maxFee);
}// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.20;
import {ISSVNetworkCore} from "./ISSVNetworkCore.sol";
import {ISSVOperators} from "./ISSVOperators.sol";
import {ISSVClusters} from "./ISSVClusters.sol";
import {ISSVDAO} from "./ISSVDAO.sol";
import {ISSVViews} from "./ISSVViews.sol";
import {SSVModules} from "../libraries/SSVStorage.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
interface ISSVNetwork {
function initialize(
IERC20 token_,
ISSVOperators ssvOperators_,
ISSVClusters ssvClusters_,
ISSVDAO ssvDAO_,
ISSVViews ssvViews_,
uint64 minimumBlocksBeforeLiquidation_,
uint256 minimumLiquidationCollateral_,
uint32 validatorsPerOperatorLimit_,
uint64 declareOperatorFeePeriod_,
uint64 executeOperatorFeePeriod_,
uint64 operatorMaxFeeIncrease_
) external;
function getVersion() external pure returns (string memory version);
function setFeeRecipientAddress(address feeRecipientAddress) external;
function updateModule(SSVModules moduleId, address moduleAddress) external;
}// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.20;
interface ISSVNetworkCore {
/***********/
/* Structs */
/***********/
/// @notice Represents a snapshot of an operator's or a DAO's state at a certain block
struct Snapshot {
/// @dev The block number when the snapshot was taken
uint32 block;
/// @dev The last index calculated by the formula index += (currentBlock - block) * fee
uint64 index;
/// @dev Total accumulated earnings calculated by the formula accumulated + lastIndex * validatorCount
uint64 balance;
}
/// @notice Represents an SSV operator
struct Operator {
/// @dev The number of validators associated with this operator
uint32 validatorCount;
/// @dev The fee charged by the operator, set to zero for private operators and cannot be increased once set
uint64 fee;
/// @dev The address of the operator's owner
address owner;
/// @dev private flag for this operator
bool whitelisted;
/// @dev The state snapshot of the operator
Snapshot snapshot;
}
/// @notice Represents a request to change an operator's fee
struct OperatorFeeChangeRequest {
/// @dev The new fee proposed by the operator
uint64 fee;
/// @dev The time when the approval period for the fee change begins
uint64 approvalBeginTime;
/// @dev The time when the approval period for the fee change ends
uint64 approvalEndTime;
}
/// @notice Represents a cluster of validators
struct Cluster {
/// @dev The number of validators in the cluster
uint32 validatorCount;
/// @dev The index of network fees related to this cluster
uint64 networkFeeIndex;
/// @dev The last index calculated for the cluster
uint64 index;
/// @dev Flag indicating whether the cluster is active
bool active;
/// @dev The balance of the cluster
uint256 balance;
}
/**********/
/* Errors */
/**********/
error CallerNotOwnerWithData(address caller, address owner); // 0x163678e9
error CallerNotWhitelistedWithData(uint64 operatorId); // 0xb7f529fe
error FeeTooLow(); // 0x732f9413
error FeeExceedsIncreaseLimit(); // 0x958065d9
error NoFeeDeclared(); // 0x1d226c30
error ApprovalNotWithinTimeframe(); // 0x97e4b518
error OperatorDoesNotExist(); // 0x961e3e8c
error InsufficientBalance(); // 0xf4d678b8
error ValidatorDoesNotExist(); // 0xe51315d2
error ClusterNotLiquidatable(); // 0x60300a8d
error InvalidPublicKeyLength(); // 0x637297a4
error InvalidOperatorIdsLength(); // 0x38186224
error ClusterAlreadyEnabled(); // 0x3babafd2
error ClusterIsLiquidated(); // 0x95a0cf33
error ClusterDoesNotExists(); // 0x185e2b16
error IncorrectClusterState(); // 0x12e04c87
error UnsortedOperatorsList(); // 0xdd020e25
error NewBlockPeriodIsBelowMinimum(); // 0x6e6c9cac
error ExceedValidatorLimitWithData(uint64 operatorId); // 0x8ddf7de4
error TokenTransferFailed(); // 0x045c4b02
error SameFeeChangeNotAllowed(); // 0xc81272f8
error FeeIncreaseNotAllowed(); // 0x410a2b6c
error NotAuthorized(); // 0xea8e4eb5
error OperatorsListNotUnique(); // 0xa5a1ff5d
error OperatorAlreadyExists(); // 0x289c9494
error TargetModuleDoesNotExistWithData(uint8 moduleId); // 0x208bb85d
error MaxValueExceeded(); // 0x91aa3017
error FeeTooHigh(); // 0xcd4e6167
error PublicKeysSharesLengthMismatch(); // 0x9ad467b8
error IncorrectValidatorStateWithData(bytes publicKey); // 0x89307938
error ValidatorAlreadyExistsWithData(bytes publicKey); // 0x388e7999
error EmptyPublicKeysList(); // df83e679
error InvalidContractAddress(); // 0xa710429d
error AddressIsWhitelistingContract(address contractAddress); // 0x71cadba7
error InvalidWhitelistingContract(address contractAddress); // 0x886e6a03
error InvalidWhitelistAddressesLength(); // 0xcbb362dc
error ZeroAddressNotAllowed(); // 0x8579befe
// legacy errors
error ValidatorAlreadyExists(); // 0x8d09a73e
error IncorrectValidatorState(); // 0x2feda3c1
error ExceedValidatorLimit(uint64 operatorId); // 0x6df5ab76
error CallerNotOwner(); // 0x5cd83192
error TargetModuleDoesNotExist(); // 0x8f9195fb
error CallerNotWhitelisted(); // 0x8c6e5d71
}// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.20;
import {ISSVNetworkCore} from "./ISSVNetworkCore.sol";
interface ISSVOperators is ISSVNetworkCore {
/// @notice Registers a new operator
/// @param publicKey The public key of the operator
/// @param fee The operator's fee (SSV)
/// @param setPrivate Flag indicating whether the operator should be set as private or not
function registerOperator(bytes calldata publicKey, uint256 fee, bool setPrivate) external returns (uint64);
/// @notice Removes an existing operator
/// @param operatorId The ID of the operator to be removed
function removeOperator(uint64 operatorId) external;
/// @notice Declares the operator's fee
/// @param operatorId The ID of the operator
/// @param fee The fee to be declared (SSV)
function declareOperatorFee(uint64 operatorId, uint256 fee) external;
/// @notice Executes the operator's fee
/// @param operatorId The ID of the operator
function executeOperatorFee(uint64 operatorId) external;
/// @notice Cancels the declared operator's fee
/// @param operatorId The ID of the operator
function cancelDeclaredOperatorFee(uint64 operatorId) external;
/// @notice Reduces the operator's fee
/// @param operatorId The ID of the operator
/// @param fee The new Operator's fee (SSV)
function reduceOperatorFee(uint64 operatorId, uint256 fee) external;
/// @notice Withdraws operator earnings
/// @param operatorId The ID of the operator
/// @param tokenAmount The amount of tokens to withdraw (SSV)
function withdrawOperatorEarnings(uint64 operatorId, uint256 tokenAmount) external;
/// @notice Withdraws all operator earnings
/// @param operatorId The ID of the operator
function withdrawAllOperatorEarnings(uint64 operatorId) external;
/// @notice Set the list of operators as private without checking for any whitelisting address
/// @notice The operators are considered private when registering validators
/// @param operatorIds The operator IDs to set as private
function setOperatorsPrivateUnchecked(uint64[] calldata operatorIds) external;
/// @notice Set the list of operators as public without removing any whitelisting address
/// @notice The operators still keep its adresses whitelisted (external contract or EOAs/generic contracts)
/// @notice The operators are considered public when registering validators
/// @param operatorIds The operator IDs to set as public
function setOperatorsPublicUnchecked(uint64[] calldata operatorIds) external;
/**
* @dev Emitted when a new operator has been added.
* @param operatorId operator's ID.
* @param owner Operator's ethereum address that can collect fees.
* @param publicKey Operator's public key. Will be used to encrypt secret shares of validators keys.
* @param fee Operator's fee.
*/
event OperatorAdded(uint64 indexed operatorId, address indexed owner, bytes publicKey, uint256 fee);
/**
* @dev Emitted when operator has been removed.
* @param operatorId operator's ID.
*/
event OperatorRemoved(uint64 indexed operatorId);
event OperatorFeeDeclared(address indexed owner, uint64 indexed operatorId, uint256 blockNumber, uint256 fee);
event OperatorFeeDeclarationCancelled(address indexed owner, uint64 indexed operatorId);
/**
* @dev Emitted when an operator's fee is updated.
* @param owner Operator's owner.
* @param blockNumber from which block number.
* @param fee updated fee value.
*/
event OperatorFeeExecuted(address indexed owner, uint64 indexed operatorId, uint256 blockNumber, uint256 fee);
event OperatorWithdrawn(address indexed owner, uint64 indexed operatorId, uint256 value);
event FeeRecipientAddressUpdated(address indexed owner, address recipientAddress);
/**
* @dev Emitted when the operators changed its privacy status
* @param operatorIds operators' IDs.
* @param toPrivate Flag that indicates if the operators are being set to private (true) or public (false).
*/
event OperatorPrivacyStatusUpdated(uint64[] operatorIds, bool toPrivate);
}// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.20;
import {ISSVNetworkCore} from "./ISSVNetworkCore.sol";
import {ISSVWhitelistingContract} from "./external/ISSVWhitelistingContract.sol";
interface ISSVOperatorsWhitelist is ISSVNetworkCore {
/// @notice Sets a list of whitelisted addresses (EOAs or generic contracts) for a list of operators
/// @notice Changes to an operator's whitelist will not impact existing validators registered with that operator
/// @notice Only new validator registrations will adhere to the updated whitelist rules
/// @param operatorIds The operator IDs to set the whitelists for
/// @param whitelistAddresses The list of addresses to be whitelisted
function setOperatorsWhitelists(uint64[] calldata operatorIds, address[] calldata whitelistAddresses) external;
/// @notice Removes a list of whitelisted addresses (EOAs or generic contracts) for a list of operators
/// @param operatorIds Operator IDs for which whitelists are removed
/// @param whitelistAddresses List of addresses to be removed from the whitelist
function removeOperatorsWhitelists(uint64[] calldata operatorIds, address[] calldata whitelistAddresses) external;
/// @notice Sets a whitelisting contract for a list of operators
/// @param operatorIds The operator IDs to set the whitelisting contract for
/// @param whitelistingContract The address of a whitelisting contract
function setOperatorsWhitelistingContract(
uint64[] calldata operatorIds,
ISSVWhitelistingContract whitelistingContract
) external;
/// @notice Removes the whitelisting contract set for a list of operators
/// @param operatorIds The operator IDs to remove the whitelisting contract for
function removeOperatorsWhitelistingContract(uint64[] calldata operatorIds) external;
/**
* @dev Emitted when a list of adresses are whitelisted for a set of operators.
* @param operatorIds operators' IDs.
* @param whitelistAddresses operators' new whitelist addresses (EOAs or generic contracts).
*/
event OperatorMultipleWhitelistUpdated(uint64[] operatorIds, address[] whitelistAddresses);
/**
* @dev Emitted when a list of adresses are de-whitelisted for a set of operators.
* @param operatorIds operators' IDs.
* @param whitelistAddresses operators' list of whitelist addresses to be removed (EOAs or generic contracts).
*/
event OperatorMultipleWhitelistRemoved(uint64[] operatorIds, address[] whitelistAddresses);
/**
* @dev Emitted when the whitelisting contract of an operator is updated.
* @param operatorIds operators' IDs.
* @param whitelistingContract operators' new whitelisting contract address.
*/
event OperatorWhitelistingContractUpdated(uint64[] operatorIds, address whitelistingContract);
}// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.20;
import {ISSVNetworkCore} from "./ISSVNetworkCore.sol";
interface ISSVViews is ISSVNetworkCore {
/// @notice Gets the validator status
/// @param owner The address of the validator's owner
/// @param publicKey The public key of the validator
/// @return active A boolean indicating if the validator is active. If it does not exist, returns false.
function getValidator(address owner, bytes calldata publicKey) external view returns (bool);
/// @notice Gets the operator fee
/// @param operatorId The ID of the operator
/// @return fee The fee associated with the operator (SSV). If the operator does not exist, the returned value is 0.
function getOperatorFee(uint64 operatorId) external view returns (uint256 fee);
/// @notice Gets the declared operator fee
/// @param operatorId The ID of the operator
/// @return isFeeDeclared A boolean indicating if the fee is declared
/// @return fee The declared operator fee (SSV)
/// @return approvalBeginTime The time when the fee approval process begins
/// @return approvalEndTime The time when the fee approval process ends
function getOperatorDeclaredFee(
uint64 operatorId
) external view returns (bool isFeeDeclared, uint256 fee, uint64 approvalBeginTime, uint64 approvalEndTime);
/// @notice Gets operator details by ID
/// @param operatorId The ID of the operator
/// @return owner The owner of the operator
/// @return fee The fee associated with the operator (SSV)
/// @return validatorCount The count of validators associated with the operator
/// @return whitelistedAddress The whitelisted address of the operator. It can be and EOA or generic contract (legacy) or a whitelisting contract
/// @return isPrivate A boolean indicating if the operator is private (uses whitelisting contract or SSV Whitelisting module)
/// @return active A boolean indicating if the operator is active
function getOperatorById(
uint64 operatorId
)
external
view
returns (
address owner,
uint256 fee,
uint32 validatorCount,
address whitelistedAddress,
bool isPrivate,
bool active
);
/// @notice Gets the list of operators that have the given whitelisted address (EOA or generic contract)
/// @param operatorIds The list of operator IDs to check
/// @param whitelistedAddress The address whitelisted for the operators
/// @return whitelistedOperatorIds The list of operator IDs that have the given whitelisted address
function getWhitelistedOperators(
uint64[] calldata operatorIds,
address whitelistedAddress
) external view returns (uint64[] memory whitelistedOperatorIds);
/// @notice Checks if the given address is a whitelisting contract (implements ISSVWhitelistingContract)
/// @param contractAddress The address to check
/// @return isWhitelistingContract A boolean indicating if the address is a whitelisting contract
function isWhitelistingContract(address contractAddress) external view returns (bool isWhitelistingContract);
/// @notice Checks if the given address is whitelisted in a specific whitelisting contract.
/// @notice It's up to the whitelisting contract implementation to use the operatorId parameter or not.
/// @param addressToCheck The address to check
/// @param operatorId The operator ID to check in combination with addressToCheck
/// @param whitelistingContract The whitelisting contract address
/// @return isWhitelisted A boolean indicating if the address is whitelisted in the given whitelisting contract for the given operator
function isAddressWhitelistedInWhitelistingContract(
address addressToCheck,
uint256 operatorId,
address whitelistingContract
) external view returns (bool isWhitelisted);
/// @notice Checks if the cluster can be liquidated
/// @param owner The owner address of the cluster
/// @param operatorIds The IDs of the operators in the cluster
/// @return isLiquidatable A boolean indicating if the cluster can be liquidated
function isLiquidatable(
address owner,
uint64[] calldata operatorIds,
Cluster memory cluster
) external view returns (bool isLiquidatable);
/// @notice Checks if the cluster is liquidated
/// @param owner The owner address of the cluster
/// @param operatorIds The IDs of the operators in the cluster
/// @return isLiquidated A boolean indicating if the cluster is liquidated
function isLiquidated(
address owner,
uint64[] memory operatorIds,
Cluster memory cluster
) external view returns (bool isLiquidated);
/// @notice Gets the burn rate of the cluster
/// @param owner The owner address of the cluster
/// @param operatorIds The IDs of the operators in the cluster
/// @return burnRate The burn rate of the cluster (SSV)
function getBurnRate(
address owner,
uint64[] memory operatorIds,
Cluster memory cluster
) external view returns (uint256 burnRate);
/// @notice Gets operator earnings
/// @param operatorId The ID of the operator
/// @return earnings The earnings associated with the operator (SSV)
function getOperatorEarnings(uint64 operatorId) external view returns (uint256 earnings);
/// @notice Gets the balance of the cluster
/// @param owner The owner address of the cluster
/// @param operatorIds The IDs of the operators in the cluster
/// @return balance The balance of the cluster (SSV)
function getBalance(
address owner,
uint64[] memory operatorIds,
Cluster memory cluster
) external view returns (uint256 balance);
/// @notice Gets the network fee
/// @return networkFee The fee associated with the network (SSV)
function getNetworkFee() external view returns (uint256 networkFee);
/// @notice Gets the network earnings
/// @return networkEarnings The earnings associated with the network (SSV)
function getNetworkEarnings() external view returns (uint256 networkEarnings);
/// @notice Gets the operator fee increase limit
/// @return The maximum limit of operator fee increase
function getOperatorFeeIncreaseLimit() external view returns (uint64);
/// @notice Gets the operator maximum fee for operators that use SSV token
/// @return The maximum fee value (SSV)
function getMaximumOperatorFee() external view returns (uint64);
/// @notice Gets the periods of operator fee declaration and execution
/// @return The period for declaring operator fee
/// @return The period for executing operator fee
function getOperatorFeePeriods() external view returns (uint64, uint64);
/// @notice Gets the liquidation threshold period
/// @return blocks The number of blocks for the liquidation threshold period
function getLiquidationThresholdPeriod() external view returns (uint64 blocks);
/// @notice Gets the minimum liquidation collateral
/// @return amount The minimum amount of collateral for liquidation (SSV)
function getMinimumLiquidationCollateral() external view returns (uint256 amount);
/// @notice Gets the maximum limit of validators per operator
/// @return validators The maximum number of validators per operator
function getValidatorsPerOperatorLimit() external view returns (uint32 validators);
/// @notice Gets the total number of validators in the network
/// @return validatorsCount The total number of validators in the network
function getNetworkValidatorsCount() external view returns (uint32 validatorsCount);
/// @notice Gets the version of the contract
/// @return The version of the contract
function getVersion() external view returns (string memory);
}// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.24;
import "./SSVStorage.sol";
library CoreLib {
event ModuleUpgraded(SSVModules indexed moduleId, address moduleAddress);
function getVersion() internal pure returns (string memory) {
return "v1.2.0";
}
function transferBalance(address to, uint256 amount) internal {
if (!SSVStorage.load().token.transfer(to, amount)) {
revert ISSVNetworkCore.TokenTransferFailed();
}
}
function deposit(uint256 amount) internal {
if (!SSVStorage.load().token.transferFrom(msg.sender, address(this), amount)) {
revert ISSVNetworkCore.TokenTransferFailed();
}
}
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*/
function isContract(address account) internal view returns (bool) {
if (account == address(0)) {
return false;
}
// This method relies on extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
// solhint-disable-next-line no-inline-assembly
assembly {
size := extcodesize(account)
}
return size > 0;
}
function setModuleContract(SSVModules moduleId, address moduleAddress) internal {
if (!isContract(moduleAddress)) revert ISSVNetworkCore.TargetModuleDoesNotExistWithData(uint8(moduleId));
SSVStorage.load().ssvContracts[moduleId] = moduleAddress;
emit ModuleUpgraded(moduleId, moduleAddress);
}
}// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.24;
import "../interfaces/ISSVNetworkCore.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
enum SSVModules {
SSV_OPERATORS,
SSV_CLUSTERS,
SSV_DAO,
SSV_VIEWS,
SSV_OPERATORS_WHITELIST
}
/// @title SSV Network Storage Data
/// @notice Represents all operational state required by the SSV Network
struct StorageData {
/// @notice Maps each validator's public key to its hashed representation of: operator Ids used by the validator and active / inactive flag (uses LSB)
mapping(bytes32 => bytes32) validatorPKs;
/// @notice Maps each cluster's bytes32 identifier to its hashed representation of ISSVNetworkCore.Cluster
mapping(bytes32 => bytes32) clusters;
/// @notice Maps each operator's public key to its corresponding ID
mapping(bytes32 => uint64) operatorsPKs;
/// @notice Maps each SSVModules' module to its corresponding contract address
mapping(SSVModules => address) ssvContracts;
/// @notice Operators' whitelist: Maps each operator's ID to a whitelisting contract
mapping(uint64 => address) operatorsWhitelist;
/// @notice Maps each operator's ID to its corresponding operator fee change request data
mapping(uint64 => ISSVNetworkCore.OperatorFeeChangeRequest) operatorFeeChangeRequests;
/// @notice Maps each operator's ID to its corresponding operator data
mapping(uint64 => ISSVNetworkCore.Operator) operators;
/// @notice The SSV token used within the network (fees, rewards)
IERC20 token;
/// @notice Counter keeping track of the last Operator ID issued
Counters.Counter lastOperatorId;
/// @notice Operators' whitelist: Maps each whitelisted address to a list of operators
/// @notice that are whitelisted for that address using bitmaps
/// @dev The nested mapping's key represents a uint256 slot to handle more than 256 operators per address
mapping(address => mapping(uint256 => uint256)) addressWhitelistedForOperators;
}
library SSVStorage {
uint256 private constant SSV_STORAGE_POSITION = uint256(keccak256("ssv.network.storage.main")) - 1;
function load() internal pure returns (StorageData storage sd) {
uint256 position = SSV_STORAGE_POSITION;
assembly {
sd.slot := position
}
}
}// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.24;
/// @title SSV Network Storage Protocol
/// @notice Represents the operational settings and parameters required by the SSV Network
struct StorageProtocol {
/// @notice The block number when the network fee index was last updated
uint32 networkFeeIndexBlockNumber;
/// @notice The count of validators governed by the DAO
uint32 daoValidatorCount;
/// @notice The block number when the DAO index was last updated
uint32 daoIndexBlockNumber;
/// @notice The maximum limit of validators per operator
uint32 validatorsPerOperatorLimit;
/// @notice The current network fee value
uint64 networkFee;
/// @notice The current network fee index value
uint64 networkFeeIndex;
/// @notice The current balance of the DAO
uint64 daoBalance;
/// @notice The minimum number of blocks before a liquidation event can be triggered
uint64 minimumBlocksBeforeLiquidation;
/// @notice The minimum collateral required for liquidation
uint64 minimumLiquidationCollateral;
/// @notice The period in which an operator can declare a fee change
uint64 declareOperatorFeePeriod;
/// @notice The period in which an operator fee change can be executed
uint64 executeOperatorFeePeriod;
/// @notice The maximum increase in operator fee that is allowed (percentage)
uint64 operatorMaxFeeIncrease;
/// @notice The maximum value in operator fee that is allowed (SSV)
uint64 operatorMaxFee;
}
library SSVStorageProtocol {
uint256 private constant SSV_STORAGE_POSITION = uint256(keccak256("ssv.network.storage.protocol")) - 1;
function load() internal pure returns (StorageProtocol storage sd) {
uint256 position = SSV_STORAGE_POSITION;
assembly {
sd.slot := position
}
}
}// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.24;
uint256 constant DEDUCTED_DIGITS = 10_000_000;
library Types64 {
function expand(uint64 value) internal pure returns (uint256) {
return value * DEDUCTED_DIGITS;
}
}
library Types256 {
function shrink(uint256 value) internal pure returns (uint64) {
require(value < (2 ** 64 * DEDUCTED_DIGITS), "Max value exceeded");
return uint64(shrinkable(value) / DEDUCTED_DIGITS);
}
function shrinkable(uint256 value) internal pure returns (uint256) {
require(value % DEDUCTED_DIGITS == 0, "Max precision exceeded");
return value;
}
}// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.24;
import "./interfaces/ISSVNetwork.sol";
import "./interfaces/ISSVClusters.sol";
import "./interfaces/ISSVOperators.sol";
import "./interfaces/ISSVOperatorsWhitelist.sol";
import "./interfaces/ISSVDAO.sol";
import "./interfaces/ISSVViews.sol";
import "./interfaces/external/ISSVWhitelistingContract.sol";
import "./libraries/Types.sol";
import "./libraries/CoreLib.sol";
import "./libraries/SSVStorage.sol";
import "./libraries/SSVStorageProtocol.sol";
import "./SSVProxy.sol";
import {SSVModules} from "./libraries/SSVStorage.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol";
contract SSVNetwork is
UUPSUpgradeable,
Ownable2StepUpgradeable,
ISSVNetwork,
ISSVOperators,
ISSVOperatorsWhitelist,
ISSVClusters,
ISSVDAO,
SSVProxy
{
using Types256 for uint256;
/****************/
/* Initializers */
/****************/
function initialize(
IERC20 token_,
ISSVOperators ssvOperators_,
ISSVClusters ssvClusters_,
ISSVDAO ssvDAO_,
ISSVViews ssvViews_,
uint64 minimumBlocksBeforeLiquidation_,
uint256 minimumLiquidationCollateral_,
uint32 validatorsPerOperatorLimit_,
uint64 declareOperatorFeePeriod_,
uint64 executeOperatorFeePeriod_,
uint64 operatorMaxFeeIncrease_
) external override initializer onlyProxy {
__UUPSUpgradeable_init();
__Ownable_init_unchained();
__SSVNetwork_init_unchained(
token_,
ssvOperators_,
ssvClusters_,
ssvDAO_,
ssvViews_,
minimumBlocksBeforeLiquidation_,
minimumLiquidationCollateral_,
validatorsPerOperatorLimit_,
declareOperatorFeePeriod_,
executeOperatorFeePeriod_,
operatorMaxFeeIncrease_
);
}
function __SSVNetwork_init_unchained(
IERC20 token_,
ISSVOperators ssvOperators_,
ISSVClusters ssvClusters_,
ISSVDAO ssvDAO_,
ISSVViews ssvViews_,
uint64 minimumBlocksBeforeLiquidation_,
uint256 minimumLiquidationCollateral_,
uint32 validatorsPerOperatorLimit_,
uint64 declareOperatorFeePeriod_,
uint64 executeOperatorFeePeriod_,
uint64 operatorMaxFeeIncrease_
) internal onlyInitializing {
StorageData storage s = SSVStorage.load();
StorageProtocol storage sp = SSVStorageProtocol.load();
s.token = token_;
s.ssvContracts[SSVModules.SSV_OPERATORS] = address(ssvOperators_);
s.ssvContracts[SSVModules.SSV_CLUSTERS] = address(ssvClusters_);
s.ssvContracts[SSVModules.SSV_DAO] = address(ssvDAO_);
s.ssvContracts[SSVModules.SSV_VIEWS] = address(ssvViews_);
sp.minimumBlocksBeforeLiquidation = minimumBlocksBeforeLiquidation_;
sp.minimumLiquidationCollateral = minimumLiquidationCollateral_.shrink();
sp.validatorsPerOperatorLimit = validatorsPerOperatorLimit_;
sp.declareOperatorFeePeriod = declareOperatorFeePeriod_;
sp.executeOperatorFeePeriod = executeOperatorFeePeriod_;
sp.operatorMaxFeeIncrease = operatorMaxFeeIncrease_;
}
/// @custom:oz-upgrades-unsafe-allow constructor
constructor() {
_disableInitializers();
}
/*****************/
/* UUPS required */
/*****************/
function _authorizeUpgrade(address) internal override onlyOwner {}
/*********************/
/* Fallback function */
/*********************/
fallback() external {
// Delegates the call to the address of the SSV Views module
_delegate(SSVStorage.load().ssvContracts[SSVModules.SSV_VIEWS]);
}
/*******************************/
/* Operator External Functions */
/*******************************/
function registerOperator(
bytes calldata publicKey,
uint256 fee,
bool setPrivate
) external override returns (uint64 id) {
_delegate(SSVStorage.load().ssvContracts[SSVModules.SSV_OPERATORS]);
}
function removeOperator(uint64 operatorId) external override {
_delegate(SSVStorage.load().ssvContracts[SSVModules.SSV_OPERATORS]);
}
function setOperatorsWhitelists(
uint64[] calldata operatorIds,
address[] calldata whitelistAddresses
) external override {
_delegate(SSVStorage.load().ssvContracts[SSVModules.SSV_OPERATORS_WHITELIST]);
}
function removeOperatorsWhitelists(
uint64[] calldata operatorIds,
address[] calldata whitelistAddresses
) external override {
_delegate(SSVStorage.load().ssvContracts[SSVModules.SSV_OPERATORS_WHITELIST]);
}
function setOperatorsWhitelistingContract(
uint64[] calldata operatorIds,
ISSVWhitelistingContract whitelistingContract
) external override {
_delegate(SSVStorage.load().ssvContracts[SSVModules.SSV_OPERATORS_WHITELIST]);
}
function setOperatorsPrivateUnchecked(uint64[] calldata operatorIds) external override {
_delegate(SSVStorage.load().ssvContracts[SSVModules.SSV_OPERATORS]);
}
function setOperatorsPublicUnchecked(uint64[] calldata operatorIds) external {
_delegate(SSVStorage.load().ssvContracts[SSVModules.SSV_OPERATORS]);
}
function removeOperatorsWhitelistingContract(uint64[] calldata operatorIds) external override {
_delegate(SSVStorage.load().ssvContracts[SSVModules.SSV_OPERATORS_WHITELIST]);
}
function declareOperatorFee(uint64 operatorId, uint256 fee) external override {
_delegate(SSVStorage.load().ssvContracts[SSVModules.SSV_OPERATORS]);
}
function executeOperatorFee(uint64 operatorId) external override {
_delegate(SSVStorage.load().ssvContracts[SSVModules.SSV_OPERATORS]);
}
function cancelDeclaredOperatorFee(uint64 operatorId) external override {
_delegate(SSVStorage.load().ssvContracts[SSVModules.SSV_OPERATORS]);
}
function reduceOperatorFee(uint64 operatorId, uint256 fee) external override {
_delegate(SSVStorage.load().ssvContracts[SSVModules.SSV_OPERATORS]);
}
function withdrawOperatorEarnings(uint64 operatorId, uint256 amount) external override {
_delegate(SSVStorage.load().ssvContracts[SSVModules.SSV_OPERATORS]);
}
function withdrawAllOperatorEarnings(uint64 operatorId) external override {
_delegate(SSVStorage.load().ssvContracts[SSVModules.SSV_OPERATORS]);
}
/*******************************/
/* Address External Functions */
/*******************************/
function setFeeRecipientAddress(address recipientAddress) external override {
emit FeeRecipientAddressUpdated(msg.sender, recipientAddress);
}
/*******************************/
/* Validator External Functions */
/*******************************/
function registerValidator(
bytes calldata publicKey,
uint64[] calldata operatorIds,
bytes calldata sharesData,
uint256 amount,
ISSVNetworkCore.Cluster memory cluster
) external override {
_delegate(SSVStorage.load().ssvContracts[SSVModules.SSV_CLUSTERS]);
}
function bulkRegisterValidator(
bytes[] calldata publicKeys,
uint64[] calldata operatorIds,
bytes[] calldata sharesData,
uint256 amount,
ISSVNetworkCore.Cluster memory cluster
) external override {
_delegate(SSVStorage.load().ssvContracts[SSVModules.SSV_CLUSTERS]);
}
function removeValidator(
bytes calldata publicKey,
uint64[] calldata operatorIds,
ISSVNetworkCore.Cluster memory cluster
) external override {
_delegate(SSVStorage.load().ssvContracts[SSVModules.SSV_CLUSTERS]);
}
function bulkRemoveValidator(
bytes[] calldata publicKeys,
uint64[] calldata operatorIds,
Cluster memory cluster
) external override {
_delegate(SSVStorage.load().ssvContracts[SSVModules.SSV_CLUSTERS]);
}
function liquidate(
address clusterOwner,
uint64[] calldata operatorIds,
ISSVNetworkCore.Cluster memory cluster
) external {
_delegate(SSVStorage.load().ssvContracts[SSVModules.SSV_CLUSTERS]);
}
function reactivate(
uint64[] calldata operatorIds,
uint256 amount,
ISSVNetworkCore.Cluster memory cluster
) external override {
_delegate(SSVStorage.load().ssvContracts[SSVModules.SSV_CLUSTERS]);
}
function deposit(
address clusterOwner,
uint64[] calldata operatorIds,
uint256 amount,
ISSVNetworkCore.Cluster memory cluster
) external override {
_delegate(SSVStorage.load().ssvContracts[SSVModules.SSV_CLUSTERS]);
}
function withdraw(
uint64[] calldata operatorIds,
uint256 amount,
ISSVNetworkCore.Cluster memory cluster
) external override {
_delegate(SSVStorage.load().ssvContracts[SSVModules.SSV_CLUSTERS]);
}
function exitValidator(bytes calldata publicKey, uint64[] calldata operatorIds) external override {
_delegate(SSVStorage.load().ssvContracts[SSVModules.SSV_CLUSTERS]);
}
function bulkExitValidator(bytes[] calldata publicKeys, uint64[] calldata operatorIds) external override {
_delegate(SSVStorage.load().ssvContracts[SSVModules.SSV_CLUSTERS]);
}
function updateNetworkFee(uint256 fee) external override onlyOwner {
_delegate(SSVStorage.load().ssvContracts[SSVModules.SSV_DAO]);
}
function withdrawNetworkEarnings(uint256 amount) external override onlyOwner {
_delegate(SSVStorage.load().ssvContracts[SSVModules.SSV_DAO]);
}
function updateOperatorFeeIncreaseLimit(uint64 percentage) external override onlyOwner {
_delegate(SSVStorage.load().ssvContracts[SSVModules.SSV_DAO]);
}
function updateDeclareOperatorFeePeriod(uint64 timeInSeconds) external override onlyOwner {
_delegate(SSVStorage.load().ssvContracts[SSVModules.SSV_DAO]);
}
function updateExecuteOperatorFeePeriod(uint64 timeInSeconds) external override onlyOwner {
_delegate(SSVStorage.load().ssvContracts[SSVModules.SSV_DAO]);
}
function updateLiquidationThresholdPeriod(uint64 blocks) external override onlyOwner {
_delegate(SSVStorage.load().ssvContracts[SSVModules.SSV_DAO]);
}
function updateMinimumLiquidationCollateral(uint256 amount) external override onlyOwner {
_delegate(SSVStorage.load().ssvContracts[SSVModules.SSV_DAO]);
}
function updateMaximumOperatorFee(uint64 maxFee) external override onlyOwner {
_delegate(SSVStorage.load().ssvContracts[SSVModules.SSV_DAO]);
}
function getVersion() external pure override returns (string memory version) {
return CoreLib.getVersion();
}
/*******************************/
/* Upgrade Modules Function */
/*******************************/
function updateModule(SSVModules moduleId, address moduleAddress) external onlyOwner {
CoreLib.setModuleContract(moduleId, moduleAddress);
}
}// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.24;
import {SSVModules, SSVStorage, StorageData} from "./libraries/SSVStorage.sol";
abstract contract SSVProxy {
function _delegate(address implementation) internal {
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())
}
}
}
}{
"optimizer": {
"enabled": true,
"runs": 10000
},
"evmVersion": "cancun",
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"}],"name":"AddressIsWhitelistingContract","type":"error"},{"inputs":[],"name":"ApprovalNotWithinTimeframe","type":"error"},{"inputs":[],"name":"CallerNotOwner","type":"error"},{"inputs":[{"internalType":"address","name":"caller","type":"address"},{"internalType":"address","name":"owner","type":"address"}],"name":"CallerNotOwnerWithData","type":"error"},{"inputs":[],"name":"CallerNotWhitelisted","type":"error"},{"inputs":[{"internalType":"uint64","name":"operatorId","type":"uint64"}],"name":"CallerNotWhitelistedWithData","type":"error"},{"inputs":[],"name":"ClusterAlreadyEnabled","type":"error"},{"inputs":[],"name":"ClusterDoesNotExists","type":"error"},{"inputs":[],"name":"ClusterIsLiquidated","type":"error"},{"inputs":[],"name":"ClusterNotLiquidatable","type":"error"},{"inputs":[],"name":"EmptyPublicKeysList","type":"error"},{"inputs":[{"internalType":"uint64","name":"operatorId","type":"uint64"}],"name":"ExceedValidatorLimit","type":"error"},{"inputs":[{"internalType":"uint64","name":"operatorId","type":"uint64"}],"name":"ExceedValidatorLimitWithData","type":"error"},{"inputs":[],"name":"FeeExceedsIncreaseLimit","type":"error"},{"inputs":[],"name":"FeeIncreaseNotAllowed","type":"error"},{"inputs":[],"name":"FeeTooHigh","type":"error"},{"inputs":[],"name":"FeeTooLow","type":"error"},{"inputs":[],"name":"IncorrectClusterState","type":"error"},{"inputs":[],"name":"IncorrectValidatorState","type":"error"},{"inputs":[{"internalType":"bytes","name":"publicKey","type":"bytes"}],"name":"IncorrectValidatorStateWithData","type":"error"},{"inputs":[],"name":"InsufficientBalance","type":"error"},{"inputs":[],"name":"InvalidContractAddress","type":"error"},{"inputs":[],"name":"InvalidOperatorIdsLength","type":"error"},{"inputs":[],"name":"InvalidPublicKeyLength","type":"error"},{"inputs":[],"name":"InvalidWhitelistAddressesLength","type":"error"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"}],"name":"InvalidWhitelistingContract","type":"error"},{"inputs":[],"name":"MaxValueExceeded","type":"error"},{"inputs":[],"name":"NewBlockPeriodIsBelowMinimum","type":"error"},{"inputs":[],"name":"NoFeeDeclared","type":"error"},{"inputs":[],"name":"NotAuthorized","type":"error"},{"inputs":[],"name":"OperatorAlreadyExists","type":"error"},{"inputs":[],"name":"OperatorDoesNotExist","type":"error"},{"inputs":[],"name":"OperatorsListNotUnique","type":"error"},{"inputs":[],"name":"PublicKeysSharesLengthMismatch","type":"error"},{"inputs":[],"name":"SameFeeChangeNotAllowed","type":"error"},{"inputs":[],"name":"TargetModuleDoesNotExist","type":"error"},{"inputs":[{"internalType":"uint8","name":"moduleId","type":"uint8"}],"name":"TargetModuleDoesNotExistWithData","type":"error"},{"inputs":[],"name":"TokenTransferFailed","type":"error"},{"inputs":[],"name":"UnsortedOperatorsList","type":"error"},{"inputs":[],"name":"ValidatorAlreadyExists","type":"error"},{"inputs":[{"internalType":"bytes","name":"publicKey","type":"bytes"}],"name":"ValidatorAlreadyExistsWithData","type":"error"},{"inputs":[],"name":"ValidatorDoesNotExist","type":"error"},{"inputs":[],"name":"ZeroAddressNotAllowed","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":"beacon","type":"address"}],"name":"BeaconUpgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint64[]","name":"operatorIds","type":"uint64[]"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"components":[{"internalType":"uint32","name":"validatorCount","type":"uint32"},{"internalType":"uint64","name":"networkFeeIndex","type":"uint64"},{"internalType":"uint64","name":"index","type":"uint64"},{"internalType":"bool","name":"active","type":"bool"},{"internalType":"uint256","name":"balance","type":"uint256"}],"indexed":false,"internalType":"struct ISSVNetworkCore.Cluster","name":"cluster","type":"tuple"}],"name":"ClusterDeposited","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint64[]","name":"operatorIds","type":"uint64[]"},{"components":[{"internalType":"uint32","name":"validatorCount","type":"uint32"},{"internalType":"uint64","name":"networkFeeIndex","type":"uint64"},{"internalType":"uint64","name":"index","type":"uint64"},{"internalType":"bool","name":"active","type":"bool"},{"internalType":"uint256","name":"balance","type":"uint256"}],"indexed":false,"internalType":"struct ISSVNetworkCore.Cluster","name":"cluster","type":"tuple"}],"name":"ClusterLiquidated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint64[]","name":"operatorIds","type":"uint64[]"},{"components":[{"internalType":"uint32","name":"validatorCount","type":"uint32"},{"internalType":"uint64","name":"networkFeeIndex","type":"uint64"},{"internalType":"uint64","name":"index","type":"uint64"},{"internalType":"bool","name":"active","type":"bool"},{"internalType":"uint256","name":"balance","type":"uint256"}],"indexed":false,"internalType":"struct ISSVNetworkCore.Cluster","name":"cluster","type":"tuple"}],"name":"ClusterReactivated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint64[]","name":"operatorIds","type":"uint64[]"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"components":[{"internalType":"uint32","name":"validatorCount","type":"uint32"},{"internalType":"uint64","name":"networkFeeIndex","type":"uint64"},{"internalType":"uint64","name":"index","type":"uint64"},{"internalType":"bool","name":"active","type":"bool"},{"internalType":"uint256","name":"balance","type":"uint256"}],"indexed":false,"internalType":"struct ISSVNetworkCore.Cluster","name":"cluster","type":"tuple"}],"name":"ClusterWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"value","type":"uint64"}],"name":"DeclareOperatorFeePeriodUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"value","type":"uint64"}],"name":"ExecuteOperatorFeePeriodUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"address","name":"recipientAddress","type":"address"}],"name":"FeeRecipientAddressUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"value","type":"uint64"}],"name":"LiquidationThresholdPeriodUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"MinimumLiquidationCollateralUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"enum SSVModules","name":"moduleId","type":"uint8"},{"indexed":false,"internalType":"address","name":"moduleAddress","type":"address"}],"name":"ModuleUpgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":false,"internalType":"address","name":"recipient","type":"address"}],"name":"NetworkEarningsWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newFee","type":"uint256"}],"name":"NetworkFeeUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"operatorId","type":"uint64"},{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"bytes","name":"publicKey","type":"bytes"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"OperatorAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"uint64","name":"operatorId","type":"uint64"}],"name":"OperatorFeeDeclarationCancelled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"uint64","name":"operatorId","type":"uint64"},{"indexed":false,"internalType":"uint256","name":"blockNumber","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"OperatorFeeDeclared","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"uint64","name":"operatorId","type":"uint64"},{"indexed":false,"internalType":"uint256","name":"blockNumber","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"OperatorFeeExecuted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"value","type":"uint64"}],"name":"OperatorFeeIncreaseLimitUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"maxFee","type":"uint64"}],"name":"OperatorMaximumFeeUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64[]","name":"operatorIds","type":"uint64[]"},{"indexed":false,"internalType":"address[]","name":"whitelistAddresses","type":"address[]"}],"name":"OperatorMultipleWhitelistRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64[]","name":"operatorIds","type":"uint64[]"},{"indexed":false,"internalType":"address[]","name":"whitelistAddresses","type":"address[]"}],"name":"OperatorMultipleWhitelistUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64[]","name":"operatorIds","type":"uint64[]"},{"indexed":false,"internalType":"bool","name":"toPrivate","type":"bool"}],"name":"OperatorPrivacyStatusUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"operatorId","type":"uint64"}],"name":"OperatorRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64[]","name":"operatorIds","type":"uint64[]"},{"indexed":false,"internalType":"address","name":"whitelistingContract","type":"address"}],"name":"OperatorWhitelistingContractUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"uint64","name":"operatorId","type":"uint64"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"OperatorWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint64[]","name":"operatorIds","type":"uint64[]"},{"indexed":false,"internalType":"bytes","name":"publicKey","type":"bytes"},{"indexed":false,"internalType":"bytes","name":"shares","type":"bytes"},{"components":[{"internalType":"uint32","name":"validatorCount","type":"uint32"},{"internalType":"uint64","name":"networkFeeIndex","type":"uint64"},{"internalType":"uint64","name":"index","type":"uint64"},{"internalType":"bool","name":"active","type":"bool"},{"internalType":"uint256","name":"balance","type":"uint256"}],"indexed":false,"internalType":"struct ISSVNetworkCore.Cluster","name":"cluster","type":"tuple"}],"name":"ValidatorAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint64[]","name":"operatorIds","type":"uint64[]"},{"indexed":false,"internalType":"bytes","name":"publicKey","type":"bytes"}],"name":"ValidatorExited","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint64[]","name":"operatorIds","type":"uint64[]"},{"indexed":false,"internalType":"bytes","name":"publicKey","type":"bytes"},{"components":[{"internalType":"uint32","name":"validatorCount","type":"uint32"},{"internalType":"uint64","name":"networkFeeIndex","type":"uint64"},{"internalType":"uint64","name":"index","type":"uint64"},{"internalType":"bool","name":"active","type":"bool"},{"internalType":"uint256","name":"balance","type":"uint256"}],"indexed":false,"internalType":"struct ISSVNetworkCore.Cluster","name":"cluster","type":"tuple"}],"name":"ValidatorRemoved","type":"event"},{"stateMutability":"nonpayable","type":"fallback"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes[]","name":"publicKeys","type":"bytes[]"},{"internalType":"uint64[]","name":"operatorIds","type":"uint64[]"}],"name":"bulkExitValidator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes[]","name":"publicKeys","type":"bytes[]"},{"internalType":"uint64[]","name":"operatorIds","type":"uint64[]"},{"internalType":"bytes[]","name":"sharesData","type":"bytes[]"},{"internalType":"uint256","name":"amount","type":"uint256"},{"components":[{"internalType":"uint32","name":"validatorCount","type":"uint32"},{"internalType":"uint64","name":"networkFeeIndex","type":"uint64"},{"internalType":"uint64","name":"index","type":"uint64"},{"internalType":"bool","name":"active","type":"bool"},{"internalType":"uint256","name":"balance","type":"uint256"}],"internalType":"struct ISSVNetworkCore.Cluster","name":"cluster","type":"tuple"}],"name":"bulkRegisterValidator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes[]","name":"publicKeys","type":"bytes[]"},{"internalType":"uint64[]","name":"operatorIds","type":"uint64[]"},{"components":[{"internalType":"uint32","name":"validatorCount","type":"uint32"},{"internalType":"uint64","name":"networkFeeIndex","type":"uint64"},{"internalType":"uint64","name":"index","type":"uint64"},{"internalType":"bool","name":"active","type":"bool"},{"internalType":"uint256","name":"balance","type":"uint256"}],"internalType":"struct ISSVNetworkCore.Cluster","name":"cluster","type":"tuple"}],"name":"bulkRemoveValidator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"operatorId","type":"uint64"}],"name":"cancelDeclaredOperatorFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"operatorId","type":"uint64"},{"internalType":"uint256","name":"fee","type":"uint256"}],"name":"declareOperatorFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"clusterOwner","type":"address"},{"internalType":"uint64[]","name":"operatorIds","type":"uint64[]"},{"internalType":"uint256","name":"amount","type":"uint256"},{"components":[{"internalType":"uint32","name":"validatorCount","type":"uint32"},{"internalType":"uint64","name":"networkFeeIndex","type":"uint64"},{"internalType":"uint64","name":"index","type":"uint64"},{"internalType":"bool","name":"active","type":"bool"},{"internalType":"uint256","name":"balance","type":"uint256"}],"internalType":"struct ISSVNetworkCore.Cluster","name":"cluster","type":"tuple"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"operatorId","type":"uint64"}],"name":"executeOperatorFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"publicKey","type":"bytes"},{"internalType":"uint64[]","name":"operatorIds","type":"uint64[]"}],"name":"exitValidator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getVersion","outputs":[{"internalType":"string","name":"version","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token_","type":"address"},{"internalType":"contract ISSVOperators","name":"ssvOperators_","type":"address"},{"internalType":"contract ISSVClusters","name":"ssvClusters_","type":"address"},{"internalType":"contract ISSVDAO","name":"ssvDAO_","type":"address"},{"internalType":"contract ISSVViews","name":"ssvViews_","type":"address"},{"internalType":"uint64","name":"minimumBlocksBeforeLiquidation_","type":"uint64"},{"internalType":"uint256","name":"minimumLiquidationCollateral_","type":"uint256"},{"internalType":"uint32","name":"validatorsPerOperatorLimit_","type":"uint32"},{"internalType":"uint64","name":"declareOperatorFeePeriod_","type":"uint64"},{"internalType":"uint64","name":"executeOperatorFeePeriod_","type":"uint64"},{"internalType":"uint64","name":"operatorMaxFeeIncrease_","type":"uint64"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"validatorsPerOperatorLimit_","type":"uint32"}],"name":"initializev2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"clusterOwner","type":"address"},{"internalType":"uint64[]","name":"operatorIds","type":"uint64[]"},{"components":[{"internalType":"uint32","name":"validatorCount","type":"uint32"},{"internalType":"uint64","name":"networkFeeIndex","type":"uint64"},{"internalType":"uint64","name":"index","type":"uint64"},{"internalType":"bool","name":"active","type":"bool"},{"internalType":"uint256","name":"balance","type":"uint256"}],"internalType":"struct ISSVNetworkCore.Cluster","name":"cluster","type":"tuple"}],"name":"liquidate","outputs":[],"stateMutability":"nonpayable","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":[],"name":"proxiableUUID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64[]","name":"operatorIds","type":"uint64[]"},{"internalType":"uint256","name":"amount","type":"uint256"},{"components":[{"internalType":"uint32","name":"validatorCount","type":"uint32"},{"internalType":"uint64","name":"networkFeeIndex","type":"uint64"},{"internalType":"uint64","name":"index","type":"uint64"},{"internalType":"bool","name":"active","type":"bool"},{"internalType":"uint256","name":"balance","type":"uint256"}],"internalType":"struct ISSVNetworkCore.Cluster","name":"cluster","type":"tuple"}],"name":"reactivate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"operatorId","type":"uint64"},{"internalType":"uint256","name":"fee","type":"uint256"}],"name":"reduceOperatorFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"publicKey","type":"bytes"},{"internalType":"uint256","name":"fee","type":"uint256"},{"internalType":"bool","name":"setPrivate","type":"bool"}],"name":"registerOperator","outputs":[{"internalType":"uint64","name":"id","type":"uint64"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"publicKey","type":"bytes"},{"internalType":"uint64[]","name":"operatorIds","type":"uint64[]"},{"internalType":"bytes","name":"sharesData","type":"bytes"},{"internalType":"uint256","name":"amount","type":"uint256"},{"components":[{"internalType":"uint32","name":"validatorCount","type":"uint32"},{"internalType":"uint64","name":"networkFeeIndex","type":"uint64"},{"internalType":"uint64","name":"index","type":"uint64"},{"internalType":"bool","name":"active","type":"bool"},{"internalType":"uint256","name":"balance","type":"uint256"}],"internalType":"struct ISSVNetworkCore.Cluster","name":"cluster","type":"tuple"}],"name":"registerValidator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"operatorId","type":"uint64"}],"name":"removeOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64[]","name":"operatorIds","type":"uint64[]"}],"name":"removeOperatorsWhitelistingContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64[]","name":"operatorIds","type":"uint64[]"},{"internalType":"address[]","name":"whitelistAddresses","type":"address[]"}],"name":"removeOperatorsWhitelists","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"publicKey","type":"bytes"},{"internalType":"uint64[]","name":"operatorIds","type":"uint64[]"},{"components":[{"internalType":"uint32","name":"validatorCount","type":"uint32"},{"internalType":"uint64","name":"networkFeeIndex","type":"uint64"},{"internalType":"uint64","name":"index","type":"uint64"},{"internalType":"bool","name":"active","type":"bool"},{"internalType":"uint256","name":"balance","type":"uint256"}],"internalType":"struct ISSVNetworkCore.Cluster","name":"cluster","type":"tuple"}],"name":"removeValidator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipientAddress","type":"address"}],"name":"setFeeRecipientAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64[]","name":"operatorIds","type":"uint64[]"}],"name":"setOperatorsPrivateUnchecked","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64[]","name":"operatorIds","type":"uint64[]"}],"name":"setOperatorsPublicUnchecked","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64[]","name":"operatorIds","type":"uint64[]"},{"internalType":"contract ISSVWhitelistingContract","name":"whitelistingContract","type":"address"}],"name":"setOperatorsWhitelistingContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64[]","name":"operatorIds","type":"uint64[]"},{"internalType":"address[]","name":"whitelistAddresses","type":"address[]"}],"name":"setOperatorsWhitelists","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"timeInSeconds","type":"uint64"}],"name":"updateDeclareOperatorFeePeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"timeInSeconds","type":"uint64"}],"name":"updateExecuteOperatorFeePeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"blocks","type":"uint64"}],"name":"updateLiquidationThresholdPeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"maxFee","type":"uint64"}],"name":"updateMaximumOperatorFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"updateMinimumLiquidationCollateral","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum SSVModules","name":"moduleId","type":"uint8"},{"internalType":"address","name":"moduleAddress","type":"address"}],"name":"updateModule","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"fee","type":"uint256"}],"name":"updateNetworkFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"percentage","type":"uint64"}],"name":"updateOperatorFeeIncreaseLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"}],"name":"upgradeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint64[]","name":"operatorIds","type":"uint64[]"},{"internalType":"uint256","name":"amount","type":"uint256"},{"components":[{"internalType":"uint32","name":"validatorCount","type":"uint32"},{"internalType":"uint64","name":"networkFeeIndex","type":"uint64"},{"internalType":"uint64","name":"index","type":"uint64"},{"internalType":"bool","name":"active","type":"bool"},{"internalType":"uint256","name":"balance","type":"uint256"}],"internalType":"struct ISSVNetworkCore.Cluster","name":"cluster","type":"tuple"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"operatorId","type":"uint64"}],"name":"withdrawAllOperatorEarnings","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawNetworkEarnings","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"operatorId","type":"uint64"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawOperatorEarnings","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
60a06040523060805234801562000014575f80fd5b506200001f62000025565b620000e3565b5f54610100900460ff1615620000915760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b5f5460ff90811614620000e1575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b608051612af7620001265f395f818161085a015281816108f501528181610a4201528181610ad801528181610c020152818161101401526110aa0152612af75ff3fe6080604052600436106102f1575f3560e01c8063686e682c1161018e578063b4c9c408116100e0578063dbcdc2cc11610089578063e3e324b011610063578063e3e324b0146106e6578063eb6080221461044d578063f2fde38b14610705576102f1565b8063dbcdc2cc1461069d578063e30c3978146106bc578063e39c67441461044d576102f1565b8063c626c3c6116100ba578063c626c3c614610646578063c9bbc9fa14610665578063d2231741146103d6576102f1565b8063b4c9c408146103d6578063bc26e7e514610612578063bf0f2fb21461062c576102f1565b806379e3e4e4116101425780638932cee01161011c5780638932cee01461040f5780638da5cb5b146105c7578063b317c35f146103b7576102f1565b806379e3e4e41461044d5780637dc24d52146105a8578063822124c1146104a0576102f1565b8063715018a611610173578063715018a61461056157806374f224771461057557806379ba509714610594576102f1565b8063686e682c146105285780636a31cf1d14610542576102f1565b80633659cfe6116102475780634f1ef286116101fb5780635d06ecb4116101d55780635d06ecb4146104ba5780635fec6dd0146105285780636512447d1461044d576102f1565b80634f1ef286146104d957806352d1902d146104ec5780635aed11421461050e576102f1565b80634ad00e541161022c5780634ad00e54146104a05780634b2fd45e146104ba5780634bc93b641461040f576102f1565b80633659cfe6146104675780633877322b14610486576102f1565b806322f18bf5116102a957806332afd02f1161028357806332afd02f1461042e57806335f63767146103b75780633631983f1461044d576102f1565b806322f18bf5146103f557806323d68a6d1461040f5780632e168e0e1461040f576102f1565b806312b3fc19116102da57806312b3fc1914610398578063190d82e4146103b75780631f1f9fd5146103d6576102f1565b806306e8fb9c1461034f5780630d8e6e2c1461036e575b3480156102fc575f80fd5b5061034d610308610724565b6003908101905f905b60048111156103225761032261205a565b815260208101919091526040015f205473ffffffffffffffffffffffffffffffffffffffff16610757565b005b34801561035a575f80fd5b5061034d61036936600461224f565b61077a565b348015610379575f80fd5b5061038261079a565b60405161038f919061231e565b60405180910390f35b3480156103a3575f80fd5b5061034d6103b236600461236e565b6107db565b3480156103c2575f80fd5b5061034d6103d13660046123ea565b6107ed565b3480156103e1575f80fd5b5061034d6103f0366004612412565b610806565b348015610400575f80fd5b5061034d610369366004612429565b34801561041a575f80fd5b5061034d6104293660046124ad565b610827565b348015610439575f80fd5b5061034d6104483660046124c6565b610832565b348015610458575f80fd5b5061034d6103f03660046124ad565b348015610472575f80fd5b5061034d61048136600461254e565b610843565b348015610491575f80fd5b5061034d610448366004612569565b3480156104ab575f80fd5b5061034d6103d136600461259f565b3480156104c5575f80fd5b5061034d6104d43660046124c6565b610a15565b61034d6104e73660046125de565b610a2b565b3480156104f7575f80fd5b50610500610be9565b60405190815260200161038f565b348015610519575f80fd5b5061034d6103b236600461269e565b348015610533575f80fd5b5061034d6104483660046126d5565b34801561054d575f80fd5b5061034d61055c36600461259f565b610cba565b34801561056c575f80fd5b5061034d610cc5565b348015610580575f80fd5b5061034d61058f36600461272f565b610cd8565b34801561059f575f80fd5b5061034d610e55565b3480156105b3575f80fd5b5061034d6105c2366004612748565b610eed565b3480156105d2575f80fd5b5060975473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161038f565b34801561061d575f80fd5b5061034d6103b236600461279b565b348015610637575f80fd5b5061034d6104483660046127fc565b348015610651575f80fd5b5061034d610660366004612855565b610ef8565b348015610670575f80fd5b5061068461067f36600461291d565b611239565b60405167ffffffffffffffff909116815260200161038f565b3480156106a8575f80fd5b5061034d6106b736600461254e565b61124d565b3480156106c7575f80fd5b5060c95473ffffffffffffffffffffffffffffffffffffffff166105ed565b3480156106f1575f80fd5b5061034d61070036600461296b565b61129b565b348015610710575f80fd5b5061034d61071f36600461254e565b6112ad565b5f8061075160017fd56c4f4aab8ca22f9fde432777379f436593c6027698a6995e2daea890bed1056129d2565b92915050565b365f80375f80365f845af43d5f803e808015610771573d5ff35b3d5ffd5b505050565b610790610785610724565b6003015f6001610311565b5050505050505050565b60606107d660408051808201909152600681527f76312e322e300000000000000000000000000000000000000000000000000000602082015290565b905090565b6107e6610785610724565b5050505050565b6108026107f8610724565b6003015f80610311565b5050565b61080e61135d565b610824610819610724565b6003015f6002610311565b50565b6108246107f8610724565b61083d610785610724565b50505050565b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001630036108f35760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201527f64656c656761746563616c6c000000000000000000000000000000000000000060648201526084015b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166109687f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff16146109f15760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201527f6163746976652070726f7879000000000000000000000000000000000000000060648201526084016108ea565b6109fa816113c4565b604080515f80825260208201909252610824918391906113cc565b61083d610a20610724565b6003015f6004610311565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000163003610ad65760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201527f64656c656761746563616c6c000000000000000000000000000000000000000060648201526084016108ea565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16610b4b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1614610bd45760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201527f6163746976652070726f7879000000000000000000000000000000000000000060648201526084016108ea565b610bdd826113c4565b610802828260016113cc565b5f3073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610c955760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c000000000000000060648201526084016108ea565b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc90565b610802610a20610724565b610ccd61135d565b610cd65f611597565b565b5f5460ff16610ce89060016129e5565b5f54610100900460ff16158015610d0557505f5460ff8083169116105b610d775760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016108ea565b5f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001660ff83161761010017905581610db06115c8565b805463ffffffff929092166c01000000000000000000000000027fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff9092169190911790555f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b60c954339073ffffffffffffffffffffffffffffffffffffffff168114610ee45760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f74207468652060448201527f6e6577206f776e6572000000000000000000000000000000000000000000000060648201526084016108ea565b61082481611597565b610775610a20610724565b5f54610100900460ff1615808015610f1657505f54600160ff909116105b80610f2f5750303b158015610f2f57505f5460ff166001145b610fa15760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016108ea565b5f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558015610ffd575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001630036110a85760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201527f64656c656761746563616c6c000000000000000000000000000000000000000060648201526084016108ea565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1661111d7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff16146111a65760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201527f6163746976652070726f7879000000000000000000000000000000000000000060648201526084016108ea565b6111ae6115f5565b6111b6611671565b6111c98c8c8c8c8c8c8c8c8c8c8c6116f6565b801561122b575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050505050505050565b5f6112456107f8610724565b949350505050565b60405173ffffffffffffffffffffffffffffffffffffffff8216815233907f259235c230d57def1521657e7c7951d3b385e76193378bc87ef6b56bc2ec35489060200160405180910390a250565b6112a361135d565b6108028282611af8565b6112b561135d565b60c9805473ffffffffffffffffffffffffffffffffffffffff83167fffffffffffffffffffffffff0000000000000000000000000000000000000000909116811790915561131860975473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b60975473ffffffffffffffffffffffffffffffffffffffff163314610cd65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108ea565b61082461135d565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff16156113ff5761077583611c28565b8273ffffffffffffffffffffffffffffffffffffffff166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611484575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252611481918101906129fe565b60015b6114f65760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201527f6f6e206973206e6f74205555505300000000000000000000000000000000000060648201526084016108ea565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc811461158b5760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f7860448201527f6961626c6555554944000000000000000000000000000000000000000000000060648201526084016108ea565b50610775838383611d18565b60c980547fffffffffffffffffffffffff000000000000000000000000000000000000000016905561082481611d3c565b5f8061075160017f0f1d85405047bdb6b0a60e27531f52a1f7a948613527b9b83a7552558207aa166129d2565b5f54610100900460ff16610cd65760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108ea565b5f54610100900460ff166116ed5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108ea565b610cd633611597565b5f54610100900460ff166117725760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108ea565b5f61177b610724565b90505f6117866115c8565b90508c826007015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508b826003015f8060048111156117e2576117e261205a565b60048111156117f3576117f361205a565b81526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508a826003015f600160048111156118565761185661205a565b60048111156118675761186761205a565b81526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555089826003015f600260048111156118ca576118ca61205a565b60048111156118db576118db61205a565b81526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555088826003015f6003600481111561193e5761193e61205a565b600481111561194f5761194f61205a565b815260208101919091526040015f2080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff929092169190911790556001810180547fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff166801000000000000000067ffffffffffffffff8b16021790556119eb87611db2565b600182018054835463ffffffff9099166c01000000000000000000000000027fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff90991698909817835567ffffffffffffffff96871678010000000000000000000000000000000000000000000000000277ffffffffffffffffffffffffffffffffffffffffffffffff92881670010000000000000000000000000000000002929092166fffffffffffffffffffffffffffffffff9098169790971717909555506002909301805493831668010000000000000000027fffffffffffffffffffffffffffffffff00000000000000000000000000000000909416919092161791909117905550505050505050565b611b0181611e2e565b611b4f57816004811115611b1757611b1761205a565b6040517f208bb85d00000000000000000000000000000000000000000000000000000000815260ff90911660048201526024016108ea565b80611b58610724565b6003015f846004811115611b6e57611b6e61205a565b6004811115611b7f57611b7f61205a565b81526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550816004811115611bdb57611bdb61205a565b60405173ffffffffffffffffffffffffffffffffffffffff831681527ffdf54bf052398eb41c923eb1bd596351c5e72b99959d1ca529a7f13c0a2503d79060200160405180910390a25050565b73ffffffffffffffffffffffffffffffffffffffff81163b611cb25760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084016108ea565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b611d2183611e58565b5f82511180611d2d5750805b156107755761083d8383611ea4565b6097805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f611dc96298968068010000000000000000612a15565b8210611e175760405162461bcd60e51b815260206004820152601260248201527f4d61782076616c7565206578636565646564000000000000000000000000000060448201526064016108ea565b62989680611e2483611ed0565b6107519190612a59565b5f73ffffffffffffffffffffffffffffffffffffffff8216611e5157505f919050565b503b151590565b611e6181611c28565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a250565b6060611ec98383604051806060016040528060278152602001612a9b60279139611f2f565b9392505050565b5f611ede6298968083612a6c565b15611f2b5760405162461bcd60e51b815260206004820152601660248201527f4d617820707265636973696f6e2065786365656465640000000000000000000060448201526064016108ea565b5090565b60605f808573ffffffffffffffffffffffffffffffffffffffff1685604051611f589190612a7f565b5f60405180830381855af49150503d805f8114611f90576040519150601f19603f3d011682016040523d82523d5f602084013e611f95565b606091505b5091509150611fa686838387611fb0565b9695505050505050565b6060831561202b5782515f036120245773ffffffffffffffffffffffffffffffffffffffff85163b6120245760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016108ea565b5081611245565b61124583838151156120405781518083602001fd5b8060405162461bcd60e51b81526004016108ea919061231e565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b5f8083601f840112612097575f80fd5b50813567ffffffffffffffff8111156120ae575f80fd5b6020830191508360208285010111156120c5575f80fd5b9250929050565b5f8083601f8401126120dc575f80fd5b50813567ffffffffffffffff8111156120f3575f80fd5b6020830191508360208260051b85010111156120c5575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156121815761218161210d565b604052919050565b803563ffffffff8116811461219c575f80fd5b919050565b803567ffffffffffffffff8116811461219c575f80fd5b8035801515811461219c575f80fd5b5f60a082840312156121d7575f80fd5b60405160a0810181811067ffffffffffffffff821117156121fa576121fa61210d565b60405290508061220983612189565b8152612217602084016121a1565b6020820152612228604084016121a1565b6040820152612239606084016121b8565b6060820152608083013560808201525092915050565b5f805f805f805f80610120898b031215612267575f80fd5b883567ffffffffffffffff8082111561227e575f80fd5b61228a8c838d01612087565b909a50985060208b01359150808211156122a2575f80fd5b6122ae8c838d016120cc565b909850965060408b01359150808211156122c6575f80fd5b506122d38b828c01612087565b909550935050606089013591506122ed8a60808b016121c7565b90509295985092959890939650565b5f5b838110156123165781810151838201526020016122fe565b50505f910152565b602081525f825180602084015261233c8160408501602087016122fc565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b5f805f805f60e08688031215612382575f80fd5b853567ffffffffffffffff80821115612399575f80fd5b6123a589838a01612087565b909750955060208801359150808211156123bd575f80fd5b506123ca888289016120cc565b90945092506123de905087604088016121c7565b90509295509295909350565b5f80604083850312156123fb575f80fd5b612404836121a1565b946020939093013593505050565b5f60208284031215612422575f80fd5b5035919050565b5f805f805f805f80610120898b031215612441575f80fd5b883567ffffffffffffffff80821115612458575f80fd5b6124648c838d016120cc565b909a50985060208b013591508082111561247c575f80fd5b6124888c838d016120cc565b909850965060408b01359150808211156124a0575f80fd5b506122d38b828c016120cc565b5f602082840312156124bd575f80fd5b611ec9826121a1565b5f805f80604085870312156124d9575f80fd5b843567ffffffffffffffff808211156124f0575f80fd5b6124fc888389016120cc565b90965094506020870135915080821115612514575f80fd5b50612521878288016120cc565b95989497509550505050565b73ffffffffffffffffffffffffffffffffffffffff81168114610824575f80fd5b5f6020828403121561255e575f80fd5b8135611ec98161252d565b5f805f806040858703121561257c575f80fd5b843567ffffffffffffffff80821115612593575f80fd5b6124fc88838901612087565b5f80602083850312156125b0575f80fd5b823567ffffffffffffffff8111156125c6575f80fd5b6125d2858286016120cc565b90969095509350505050565b5f80604083850312156125ef575f80fd5b82356125fa8161252d565b915060208381013567ffffffffffffffff80821115612617575f80fd5b818601915086601f83011261262a575f80fd5b81358181111561263c5761263c61210d565b61266c847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160161213a565b91508082528784828501011115612681575f80fd5b80848401858401375f848284010152508093505050509250929050565b5f805f805f60e086880312156126b2575f80fd5b853567ffffffffffffffff808211156126c9575f80fd5b6123a589838a016120cc565b5f805f8060e085870312156126e8575f80fd5b843567ffffffffffffffff8111156126fe575f80fd5b61270a878288016120cc565b9095509350506020850135915061272486604087016121c7565b905092959194509250565b5f6020828403121561273f575f80fd5b611ec982612189565b5f805f6040848603121561275a575f80fd5b833567ffffffffffffffff811115612770575f80fd5b61277c868287016120cc565b90945092505060208401356127908161252d565b809150509250925092565b5f805f805f61010086880312156127b0575f80fd5b85356127bb8161252d565b9450602086013567ffffffffffffffff8111156127d6575f80fd5b6127e2888289016120cc565b909550935050604086013591506123de87606088016121c7565b5f805f8060e0858703121561280f575f80fd5b843561281a8161252d565b9350602085013567ffffffffffffffff811115612835575f80fd5b612841878288016120cc565b9094509250612724905086604087016121c7565b5f805f805f805f805f805f6101608c8e031215612870575f80fd5b8b3561287b8161252d565b9a5060208c013561288b8161252d565b995060408c013561289b8161252d565b985060608c01356128ab8161252d565b975060808c01356128bb8161252d565b96506128c960a08d016121a1565b955060c08c013594506128de60e08d01612189565b93506128ed6101008d016121a1565b92506128fc6101208d016121a1565b915061290b6101408d016121a1565b90509295989b509295989b9093969950565b5f805f8060608587031215612930575f80fd5b843567ffffffffffffffff811115612946575f80fd5b61295287828801612087565b90955093505060208501359150612724604086016121b8565b5f806040838503121561297c575f80fd5b82356005811061298a575f80fd5b9150602083013561299a8161252d565b809150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b81810381811115610751576107516129a5565b60ff8181168382160190811115610751576107516129a5565b5f60208284031215612a0e575f80fd5b5051919050565b8082028115828204841417610751576107516129a5565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f82612a6757612a67612a2c565b500490565b5f82612a7a57612a7a612a2c565b500690565b5f8251612a908184602087016122fc565b919091019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122007f143234897fc01664cfd665bd7cd504ac152947f98bc23016f99f41b927af464736f6c63430008180033
Deployed Bytecode
0x6080604052600436106102f1575f3560e01c8063686e682c1161018e578063b4c9c408116100e0578063dbcdc2cc11610089578063e3e324b011610063578063e3e324b0146106e6578063eb6080221461044d578063f2fde38b14610705576102f1565b8063dbcdc2cc1461069d578063e30c3978146106bc578063e39c67441461044d576102f1565b8063c626c3c6116100ba578063c626c3c614610646578063c9bbc9fa14610665578063d2231741146103d6576102f1565b8063b4c9c408146103d6578063bc26e7e514610612578063bf0f2fb21461062c576102f1565b806379e3e4e4116101425780638932cee01161011c5780638932cee01461040f5780638da5cb5b146105c7578063b317c35f146103b7576102f1565b806379e3e4e41461044d5780637dc24d52146105a8578063822124c1146104a0576102f1565b8063715018a611610173578063715018a61461056157806374f224771461057557806379ba509714610594576102f1565b8063686e682c146105285780636a31cf1d14610542576102f1565b80633659cfe6116102475780634f1ef286116101fb5780635d06ecb4116101d55780635d06ecb4146104ba5780635fec6dd0146105285780636512447d1461044d576102f1565b80634f1ef286146104d957806352d1902d146104ec5780635aed11421461050e576102f1565b80634ad00e541161022c5780634ad00e54146104a05780634b2fd45e146104ba5780634bc93b641461040f576102f1565b80633659cfe6146104675780633877322b14610486576102f1565b806322f18bf5116102a957806332afd02f1161028357806332afd02f1461042e57806335f63767146103b75780633631983f1461044d576102f1565b806322f18bf5146103f557806323d68a6d1461040f5780632e168e0e1461040f576102f1565b806312b3fc19116102da57806312b3fc1914610398578063190d82e4146103b75780631f1f9fd5146103d6576102f1565b806306e8fb9c1461034f5780630d8e6e2c1461036e575b3480156102fc575f80fd5b5061034d610308610724565b6003908101905f905b60048111156103225761032261205a565b815260208101919091526040015f205473ffffffffffffffffffffffffffffffffffffffff16610757565b005b34801561035a575f80fd5b5061034d61036936600461224f565b61077a565b348015610379575f80fd5b5061038261079a565b60405161038f919061231e565b60405180910390f35b3480156103a3575f80fd5b5061034d6103b236600461236e565b6107db565b3480156103c2575f80fd5b5061034d6103d13660046123ea565b6107ed565b3480156103e1575f80fd5b5061034d6103f0366004612412565b610806565b348015610400575f80fd5b5061034d610369366004612429565b34801561041a575f80fd5b5061034d6104293660046124ad565b610827565b348015610439575f80fd5b5061034d6104483660046124c6565b610832565b348015610458575f80fd5b5061034d6103f03660046124ad565b348015610472575f80fd5b5061034d61048136600461254e565b610843565b348015610491575f80fd5b5061034d610448366004612569565b3480156104ab575f80fd5b5061034d6103d136600461259f565b3480156104c5575f80fd5b5061034d6104d43660046124c6565b610a15565b61034d6104e73660046125de565b610a2b565b3480156104f7575f80fd5b50610500610be9565b60405190815260200161038f565b348015610519575f80fd5b5061034d6103b236600461269e565b348015610533575f80fd5b5061034d6104483660046126d5565b34801561054d575f80fd5b5061034d61055c36600461259f565b610cba565b34801561056c575f80fd5b5061034d610cc5565b348015610580575f80fd5b5061034d61058f36600461272f565b610cd8565b34801561059f575f80fd5b5061034d610e55565b3480156105b3575f80fd5b5061034d6105c2366004612748565b610eed565b3480156105d2575f80fd5b5060975473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161038f565b34801561061d575f80fd5b5061034d6103b236600461279b565b348015610637575f80fd5b5061034d6104483660046127fc565b348015610651575f80fd5b5061034d610660366004612855565b610ef8565b348015610670575f80fd5b5061068461067f36600461291d565b611239565b60405167ffffffffffffffff909116815260200161038f565b3480156106a8575f80fd5b5061034d6106b736600461254e565b61124d565b3480156106c7575f80fd5b5060c95473ffffffffffffffffffffffffffffffffffffffff166105ed565b3480156106f1575f80fd5b5061034d61070036600461296b565b61129b565b348015610710575f80fd5b5061034d61071f36600461254e565b6112ad565b5f8061075160017fd56c4f4aab8ca22f9fde432777379f436593c6027698a6995e2daea890bed1056129d2565b92915050565b365f80375f80365f845af43d5f803e808015610771573d5ff35b3d5ffd5b505050565b610790610785610724565b6003015f6001610311565b5050505050505050565b60606107d660408051808201909152600681527f76312e322e300000000000000000000000000000000000000000000000000000602082015290565b905090565b6107e6610785610724565b5050505050565b6108026107f8610724565b6003015f80610311565b5050565b61080e61135d565b610824610819610724565b6003015f6002610311565b50565b6108246107f8610724565b61083d610785610724565b50505050565b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000032cd259417da4af4c506accbef7758fb352e988c1630036108f35760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201527f64656c656761746563616c6c000000000000000000000000000000000000000060648201526084015b60405180910390fd5b7f00000000000000000000000032cd259417da4af4c506accbef7758fb352e988c73ffffffffffffffffffffffffffffffffffffffff166109687f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff16146109f15760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201527f6163746976652070726f7879000000000000000000000000000000000000000060648201526084016108ea565b6109fa816113c4565b604080515f80825260208201909252610824918391906113cc565b61083d610a20610724565b6003015f6004610311565b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000032cd259417da4af4c506accbef7758fb352e988c163003610ad65760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201527f64656c656761746563616c6c000000000000000000000000000000000000000060648201526084016108ea565b7f00000000000000000000000032cd259417da4af4c506accbef7758fb352e988c73ffffffffffffffffffffffffffffffffffffffff16610b4b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1614610bd45760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201527f6163746976652070726f7879000000000000000000000000000000000000000060648201526084016108ea565b610bdd826113c4565b610802828260016113cc565b5f3073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000032cd259417da4af4c506accbef7758fb352e988c1614610c955760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c000000000000000060648201526084016108ea565b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc90565b610802610a20610724565b610ccd61135d565b610cd65f611597565b565b5f5460ff16610ce89060016129e5565b5f54610100900460ff16158015610d0557505f5460ff8083169116105b610d775760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016108ea565b5f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001660ff83161761010017905581610db06115c8565b805463ffffffff929092166c01000000000000000000000000027fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff9092169190911790555f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b60c954339073ffffffffffffffffffffffffffffffffffffffff168114610ee45760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f74207468652060448201527f6e6577206f776e6572000000000000000000000000000000000000000000000060648201526084016108ea565b61082481611597565b610775610a20610724565b5f54610100900460ff1615808015610f1657505f54600160ff909116105b80610f2f5750303b158015610f2f57505f5460ff166001145b610fa15760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016108ea565b5f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558015610ffd575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000032cd259417da4af4c506accbef7758fb352e988c1630036110a85760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201527f64656c656761746563616c6c000000000000000000000000000000000000000060648201526084016108ea565b7f00000000000000000000000032cd259417da4af4c506accbef7758fb352e988c73ffffffffffffffffffffffffffffffffffffffff1661111d7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff16146111a65760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201527f6163746976652070726f7879000000000000000000000000000000000000000060648201526084016108ea565b6111ae6115f5565b6111b6611671565b6111c98c8c8c8c8c8c8c8c8c8c8c6116f6565b801561122b575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050505050505050565b5f6112456107f8610724565b949350505050565b60405173ffffffffffffffffffffffffffffffffffffffff8216815233907f259235c230d57def1521657e7c7951d3b385e76193378bc87ef6b56bc2ec35489060200160405180910390a250565b6112a361135d565b6108028282611af8565b6112b561135d565b60c9805473ffffffffffffffffffffffffffffffffffffffff83167fffffffffffffffffffffffff0000000000000000000000000000000000000000909116811790915561131860975473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b60975473ffffffffffffffffffffffffffffffffffffffff163314610cd65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108ea565b61082461135d565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff16156113ff5761077583611c28565b8273ffffffffffffffffffffffffffffffffffffffff166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611484575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252611481918101906129fe565b60015b6114f65760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201527f6f6e206973206e6f74205555505300000000000000000000000000000000000060648201526084016108ea565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc811461158b5760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f7860448201527f6961626c6555554944000000000000000000000000000000000000000000000060648201526084016108ea565b50610775838383611d18565b60c980547fffffffffffffffffffffffff000000000000000000000000000000000000000016905561082481611d3c565b5f8061075160017f0f1d85405047bdb6b0a60e27531f52a1f7a948613527b9b83a7552558207aa166129d2565b5f54610100900460ff16610cd65760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108ea565b5f54610100900460ff166116ed5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108ea565b610cd633611597565b5f54610100900460ff166117725760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108ea565b5f61177b610724565b90505f6117866115c8565b90508c826007015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508b826003015f8060048111156117e2576117e261205a565b60048111156117f3576117f361205a565b81526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508a826003015f600160048111156118565761185661205a565b60048111156118675761186761205a565b81526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555089826003015f600260048111156118ca576118ca61205a565b60048111156118db576118db61205a565b81526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555088826003015f6003600481111561193e5761193e61205a565b600481111561194f5761194f61205a565b815260208101919091526040015f2080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff929092169190911790556001810180547fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff166801000000000000000067ffffffffffffffff8b16021790556119eb87611db2565b600182018054835463ffffffff9099166c01000000000000000000000000027fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff90991698909817835567ffffffffffffffff96871678010000000000000000000000000000000000000000000000000277ffffffffffffffffffffffffffffffffffffffffffffffff92881670010000000000000000000000000000000002929092166fffffffffffffffffffffffffffffffff9098169790971717909555506002909301805493831668010000000000000000027fffffffffffffffffffffffffffffffff00000000000000000000000000000000909416919092161791909117905550505050505050565b611b0181611e2e565b611b4f57816004811115611b1757611b1761205a565b6040517f208bb85d00000000000000000000000000000000000000000000000000000000815260ff90911660048201526024016108ea565b80611b58610724565b6003015f846004811115611b6e57611b6e61205a565b6004811115611b7f57611b7f61205a565b81526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550816004811115611bdb57611bdb61205a565b60405173ffffffffffffffffffffffffffffffffffffffff831681527ffdf54bf052398eb41c923eb1bd596351c5e72b99959d1ca529a7f13c0a2503d79060200160405180910390a25050565b73ffffffffffffffffffffffffffffffffffffffff81163b611cb25760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084016108ea565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b611d2183611e58565b5f82511180611d2d5750805b156107755761083d8383611ea4565b6097805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f611dc96298968068010000000000000000612a15565b8210611e175760405162461bcd60e51b815260206004820152601260248201527f4d61782076616c7565206578636565646564000000000000000000000000000060448201526064016108ea565b62989680611e2483611ed0565b6107519190612a59565b5f73ffffffffffffffffffffffffffffffffffffffff8216611e5157505f919050565b503b151590565b611e6181611c28565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a250565b6060611ec98383604051806060016040528060278152602001612a9b60279139611f2f565b9392505050565b5f611ede6298968083612a6c565b15611f2b5760405162461bcd60e51b815260206004820152601660248201527f4d617820707265636973696f6e2065786365656465640000000000000000000060448201526064016108ea565b5090565b60605f808573ffffffffffffffffffffffffffffffffffffffff1685604051611f589190612a7f565b5f60405180830381855af49150503d805f8114611f90576040519150601f19603f3d011682016040523d82523d5f602084013e611f95565b606091505b5091509150611fa686838387611fb0565b9695505050505050565b6060831561202b5782515f036120245773ffffffffffffffffffffffffffffffffffffffff85163b6120245760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016108ea565b5081611245565b61124583838151156120405781518083602001fd5b8060405162461bcd60e51b81526004016108ea919061231e565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b5f8083601f840112612097575f80fd5b50813567ffffffffffffffff8111156120ae575f80fd5b6020830191508360208285010111156120c5575f80fd5b9250929050565b5f8083601f8401126120dc575f80fd5b50813567ffffffffffffffff8111156120f3575f80fd5b6020830191508360208260051b85010111156120c5575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156121815761218161210d565b604052919050565b803563ffffffff8116811461219c575f80fd5b919050565b803567ffffffffffffffff8116811461219c575f80fd5b8035801515811461219c575f80fd5b5f60a082840312156121d7575f80fd5b60405160a0810181811067ffffffffffffffff821117156121fa576121fa61210d565b60405290508061220983612189565b8152612217602084016121a1565b6020820152612228604084016121a1565b6040820152612239606084016121b8565b6060820152608083013560808201525092915050565b5f805f805f805f80610120898b031215612267575f80fd5b883567ffffffffffffffff8082111561227e575f80fd5b61228a8c838d01612087565b909a50985060208b01359150808211156122a2575f80fd5b6122ae8c838d016120cc565b909850965060408b01359150808211156122c6575f80fd5b506122d38b828c01612087565b909550935050606089013591506122ed8a60808b016121c7565b90509295985092959890939650565b5f5b838110156123165781810151838201526020016122fe565b50505f910152565b602081525f825180602084015261233c8160408501602087016122fc565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b5f805f805f60e08688031215612382575f80fd5b853567ffffffffffffffff80821115612399575f80fd5b6123a589838a01612087565b909750955060208801359150808211156123bd575f80fd5b506123ca888289016120cc565b90945092506123de905087604088016121c7565b90509295509295909350565b5f80604083850312156123fb575f80fd5b612404836121a1565b946020939093013593505050565b5f60208284031215612422575f80fd5b5035919050565b5f805f805f805f80610120898b031215612441575f80fd5b883567ffffffffffffffff80821115612458575f80fd5b6124648c838d016120cc565b909a50985060208b013591508082111561247c575f80fd5b6124888c838d016120cc565b909850965060408b01359150808211156124a0575f80fd5b506122d38b828c016120cc565b5f602082840312156124bd575f80fd5b611ec9826121a1565b5f805f80604085870312156124d9575f80fd5b843567ffffffffffffffff808211156124f0575f80fd5b6124fc888389016120cc565b90965094506020870135915080821115612514575f80fd5b50612521878288016120cc565b95989497509550505050565b73ffffffffffffffffffffffffffffffffffffffff81168114610824575f80fd5b5f6020828403121561255e575f80fd5b8135611ec98161252d565b5f805f806040858703121561257c575f80fd5b843567ffffffffffffffff80821115612593575f80fd5b6124fc88838901612087565b5f80602083850312156125b0575f80fd5b823567ffffffffffffffff8111156125c6575f80fd5b6125d2858286016120cc565b90969095509350505050565b5f80604083850312156125ef575f80fd5b82356125fa8161252d565b915060208381013567ffffffffffffffff80821115612617575f80fd5b818601915086601f83011261262a575f80fd5b81358181111561263c5761263c61210d565b61266c847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160161213a565b91508082528784828501011115612681575f80fd5b80848401858401375f848284010152508093505050509250929050565b5f805f805f60e086880312156126b2575f80fd5b853567ffffffffffffffff808211156126c9575f80fd5b6123a589838a016120cc565b5f805f8060e085870312156126e8575f80fd5b843567ffffffffffffffff8111156126fe575f80fd5b61270a878288016120cc565b9095509350506020850135915061272486604087016121c7565b905092959194509250565b5f6020828403121561273f575f80fd5b611ec982612189565b5f805f6040848603121561275a575f80fd5b833567ffffffffffffffff811115612770575f80fd5b61277c868287016120cc565b90945092505060208401356127908161252d565b809150509250925092565b5f805f805f61010086880312156127b0575f80fd5b85356127bb8161252d565b9450602086013567ffffffffffffffff8111156127d6575f80fd5b6127e2888289016120cc565b909550935050604086013591506123de87606088016121c7565b5f805f8060e0858703121561280f575f80fd5b843561281a8161252d565b9350602085013567ffffffffffffffff811115612835575f80fd5b612841878288016120cc565b9094509250612724905086604087016121c7565b5f805f805f805f805f805f6101608c8e031215612870575f80fd5b8b3561287b8161252d565b9a5060208c013561288b8161252d565b995060408c013561289b8161252d565b985060608c01356128ab8161252d565b975060808c01356128bb8161252d565b96506128c960a08d016121a1565b955060c08c013594506128de60e08d01612189565b93506128ed6101008d016121a1565b92506128fc6101208d016121a1565b915061290b6101408d016121a1565b90509295989b509295989b9093969950565b5f805f8060608587031215612930575f80fd5b843567ffffffffffffffff811115612946575f80fd5b61295287828801612087565b90955093505060208501359150612724604086016121b8565b5f806040838503121561297c575f80fd5b82356005811061298a575f80fd5b9150602083013561299a8161252d565b809150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b81810381811115610751576107516129a5565b60ff8181168382160190811115610751576107516129a5565b5f60208284031215612a0e575f80fd5b5051919050565b8082028115828204841417610751576107516129a5565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f82612a6757612a67612a2c565b500490565b5f82612a7a57612a7a612a2c565b500690565b5f8251612a908184602087016122fc565b919091019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122007f143234897fc01664cfd665bd7cd504ac152947f98bc23016f99f41b927af464736f6c63430008180033
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ 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.