Overview
ETH Balance
0 ETH
Eth Value
$0.00View 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:
DxpoolBatchDeposit
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion, Audited
Contract Source Code (Solidity Standard Json-Input format)Audit Report
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";
import "./interfaces/IDepositContract.sol";
import "./interfaces/ISSVNetwork.sol";
import "./interfaces/IDxpoolBatchDeposit.sol";
import "./structs/DxpoolStructs.sol";
/**
,--. ,--. ,--. ,--.
,---.,-' '-. ,--,--.| |,-. ,---. ,-| |,--. ,--. ,---. ,---. ,---. | |
( .-''-. .-'' ,-. || /| .-. : ' .-. | \ `' / | .-. || .-. || .-. || |
.-' `) | | \ '-' || \ \\ --..--.\ `-' | / /. \ | '-' '' '-' '' '-' '| |
`----' `--' `--`--'`--'`--'`----''--' `---' '--' '--'| |-' `---' `---' `--'
`--'
**/
contract DxpoolBatchDeposit is Pausable , IDxpoolSSVBatchDeposit, Initializable , UUPSUpgradeable {
address officialDepositContract;
address private operatorAddress;
address private adminAddress;
uint256 private _max_validators;
uint256 constant PUBKEY_LENGTH = 48;
uint256 constant SIGNATURE_LENGTH = 96;
uint256 constant CREDENTIALS_LENGTH = 32;
uint256 constant DEPOSIT_AMOUNT = 32 ether;
// If 1 SSV = 0.000539 ETH, it should be 0.000539 * 10^18 = 539000000000000
uint256 private ssvPerEthExchangeRate;
ISSVNetwork private ssvNetwork;
IERC20 private ssvToken;
uint256 private currentNonce;
function initialize(
address officialDepositContract_,
address operatorAddress_,
address adminAddress_,
address ssvNetworkAddress_,
address ssvTokenAddress_,
address feeRecipientAddress_
) initializer external {
//set default _max_validators to 100
_max_validators = 100;
officialDepositContract = officialDepositContract_;
// set default ssvPerEthExchangeRate to 10000000000000000
ssvPerEthExchangeRate = 10000000000000000;
operatorAddress = operatorAddress_;
adminAddress = adminAddress_;
ssvNetwork = ISSVNetwork(ssvNetworkAddress_);
ssvToken = IERC20(ssvTokenAddress_);
ssvToken.approve(address(ssvNetwork), type(uint256).max);
ssvNetwork.setFeeRecipientAddress(feeRecipientAddress_);
}
// Only admin can update contract
function _authorizeUpgrade(address) internal override adminOnly {}
function batchDepositAndRegisterValidators(
bytes calldata pubkeys,
bytes calldata withdrawal_credentials,
bytes calldata signatures,
bytes32[] calldata deposit_data_roots,
SsvPayload calldata ssvPayload
) external payable whenNotPaused {
require(ssvPayload.currentNonce == currentNonce, "BatchDeposit And Register: Nonce must be equal");
uint256 validatorCount = deposit_data_roots.length;
require(validatorCount > 0 && validatorCount <= _max_validators,"BatchDeposit And Register: You should deposit at least one validator and not reach max limit");
require(pubkeys.length == validatorCount * PUBKEY_LENGTH, "BatchDeposit And Register: Pubkey count not match");
require(signatures.length == validatorCount * SIGNATURE_LENGTH,"BatchDeposit And Register: Signatures count not match");
require(withdrawal_credentials.length == 1 * CREDENTIALS_LENGTH,"BatchDeposit And Register: Withdrawal Credentials count don't match");
require(validatorCount == ssvPayload.sharesData.length, "BatchDeposit And Register: sharesData length not match");
bytes[] memory pubkeyArray = new bytes[](validatorCount);
for (uint256 i = 0; i < validatorCount; ++i) {
bytes memory pubkey = bytes(pubkeys[i * PUBKEY_LENGTH:(i + 1) * PUBKEY_LENGTH]);
bytes memory signature = bytes(signatures[i * SIGNATURE_LENGTH:(i + 1) * SIGNATURE_LENGTH]);
IDepositContract(officialDepositContract).deposit{
value: DEPOSIT_AMOUNT
}(pubkey, withdrawal_credentials, signature, deposit_data_roots[i]);
pubkeyArray[i] = pubkey;
}
uint256 ethAmount = msg.value - DEPOSIT_AMOUNT * validatorCount;
uint256 ssvAmount = ethAmount * 10 ** 18 / ssvPerEthExchangeRate;
require(ethAmount > 0, "BatchDeposit With SSV: ssv token amount must bigger than zero");
if (validatorCount == 1) {
ssvNetwork.registerValidator(pubkeys, ssvPayload.operatorIds, ssvPayload.sharesData[0], ssvAmount, ssvPayload.cluster);
} else {
ssvNetwork.bulkRegisterValidator(pubkeyArray, ssvPayload.operatorIds, ssvPayload.sharesData, ssvAmount, ssvPayload.cluster);
}
emit SSVEthDepositExchangeUpdated(msg.sender, ssvPayload.operatorIds, ethAmount, ssvAmount);
currentNonce += validatorCount;
}
// Compatible with ssv contract method
// registerValidator
function registerValidator(
bytes calldata publicKey,
uint64[] calldata operatorIds,
bytes calldata sharesData,
uint256 amount,
ISSVNetwork.Cluster calldata cluster
) external operatorOnly {
ssvNetwork.registerValidator(publicKey, operatorIds, sharesData, amount, cluster);
currentNonce += 1;
}
// bulkRegisterValidator
function bulkRegisterValidator(
bytes[] calldata publicKeys,
uint64[] calldata operatorIds,
bytes[] calldata sharesData,
uint256 amount,
ISSVNetwork.Cluster calldata cluster
) external operatorOnly {
ssvNetwork.bulkRegisterValidator(publicKeys, operatorIds, sharesData, amount, cluster);
uint256 validatorCount = publicKeys.length;
currentNonce += validatorCount;
}
// removeValidator
function removeValidator(
bytes calldata publicKey,
uint64[] calldata operatorIds,
ISSVNetwork.Cluster calldata cluster
) external operatorOnly {
ssvNetwork.removeValidator(publicKey, operatorIds, cluster);
}
// bulkRemoveValidator
function bulkRemoveValidator(
bytes[] calldata publicKeys,
uint64[] calldata operatorIds,
ISSVNetwork.Cluster calldata cluster
) external operatorOnly {
ssvNetwork.bulkRemoveValidator(publicKeys, operatorIds, cluster);
}
// exitValidator
function exitValidator(
bytes calldata publicKey,
uint64[] calldata operatorIds
) external operatorOnly {
ssvNetwork.exitValidator(publicKey, operatorIds);
}
// bulkExitValidator
function bulkExitValidator(
bytes[] calldata publicKeys,
uint64[] calldata operatorIds
) external operatorOnly {
ssvNetwork.bulkExitValidator(publicKeys, operatorIds);
}
// depositToClustersByPayingEth
function depositToClustersByPayingEth(
SsvDeposit[] calldata ssvDeposit
) external payable {
uint256 totalEthAmount;
for (uint256 i = 0; i < ssvDeposit.length; ++i) {
uint256 ssvAmount = ssvDeposit[i].ethAmount * 10 ** 18 / ssvPerEthExchangeRate;
ssvNetwork.deposit(address(this), ssvDeposit[i].operatorIds, ssvAmount, ssvDeposit[i].cluster);
totalEthAmount += ssvDeposit[i].ethAmount;
emit SSVDepositToCluster(msg.sender, ssvDeposit[i].publicKeys, ssvDeposit[i].operatorIds, ssvDeposit[i].ethAmount, ssvAmount);
}
require(totalEthAmount <= msg.value, "The number of eth must be less than or equal to msg.value");
}
// depositToClusterByPayingEth
function depositToClusterByPayingEth(
bytes[] calldata publicKeys,
uint64[] calldata operatorIds,
ISSVNetwork.Cluster calldata cluster
) external payable {
uint256 amount = msg.value * 10 ** 18 / ssvPerEthExchangeRate;
require(amount > 0, "The number of ssv amount must be bigger than 0");
emit SSVDepositToCluster(msg.sender, publicKeys, operatorIds, msg.value, amount);
ssvNetwork.deposit(address(this), operatorIds, amount, cluster);
}
// depositToCluster
function depositToCluster(
uint64[] calldata operatorIds,
ISSVClusters.Cluster calldata cluster,
uint256 amount
) external operatorOnly {
ssvNetwork.deposit(address(this), operatorIds, amount, cluster);
}
// withdrawFromSSV
function withdrawFromSSV(
uint64[] calldata operatorIds,
uint256 amount,
ISSVNetwork.Cluster calldata cluster
) external operatorOnly {
ssvNetwork.withdraw(operatorIds, amount, cluster);
}
// liquidate
function liquidate(
uint64[] calldata operatorIds,
ISSVNetwork.Cluster calldata cluster
) external operatorOnly {
ssvNetwork.liquidate(address(this), operatorIds, cluster);
}
// reactivate
function reactivate(
uint64[] calldata operatorIds,
uint256 amount,
ISSVNetwork.Cluster calldata cluster
) external operatorOnly {
ssvNetwork.reactivate(operatorIds, amount, cluster);
}
// setFeeReceiptAddress
function setFeeReceiptAddress(
address ssvFeeReceiptAddress
) external operatorOnly {
ssvNetwork.setFeeRecipientAddress(ssvFeeReceiptAddress);
}
// admin change the max_validators
function changeMaxValidators(uint256 max) external adminOnly {
require(max != _max_validators, "max validators must be different from current one");
require(max > 0, "Max must bigger than 0");
_max_validators = max;
}
// return max_validators
function maxValidators() external view returns (uint256) {
return _max_validators;
}
// admin can pause the contract
function pauseContract() external adminOnly {
_pause();
}
// admin can unpause the contract
function unpauseContract() external adminOnly {
_unpause();
}
function setSSVPerEthExchangeRate(uint256 rate) external operatorOnly {
emit SSVPerExchangeRateUpdated(rate);
ssvPerEthExchangeRate = rate;
}
function getSSVPerEthExchangeRate() external view returns (uint256) {
return ssvPerEthExchangeRate;
}
function setOperatorAddress(address payable operatorAddress_) external adminOnly {
emit OperatorUpdated(operatorAddress_);
operatorAddress = operatorAddress_;
}
// avoid something wrong in currentNonce
function setCurrentNonce(uint256 currentNonce_) external adminOnly {
emit NonceUpdated(currentNonce_);
currentNonce = currentNonce_;
}
function getCurrentNonce() external view returns (uint256) {
return currentNonce;
}
function getSSVBalance() external view returns (uint256) {
return ssvToken.balanceOf(address(this));
}
// return official ssv network contract address
function getSSVNetworkContractAddress() external view returns (address) {
return address(ssvNetwork);
}
// return official ssv token contract address
function getSSVTokenContractAddress() external view returns (address) {
return address(ssvToken);
}
function setSSVNetworkContract(address ssvNetwork_, address ssvToken_) external adminOnly {
emit SSVNetworkContractUpdated(ssvNetwork_, ssvToken_);
ssvNetwork = ISSVNetwork(ssvNetwork_);
ssvToken = IERC20(ssvToken_);
}
// withdraw the left eth at this address
function withdrawEth(address payable withdrawAddress, uint256 amount) external adminOnly {
if (withdrawAddress == address(0)) {
withdrawAddress = payable(msg.sender);
}
require(address(this).balance >= amount, "withdraw amount must be less than address balance");
emit Withdrawn(withdrawAddress, amount);
withdrawAddress.transfer(amount);
}
// withdraw the left ssv token at this address
function withdrawSSVToken(address withdrawAddress, uint256 amount) external adminOnly {
if (withdrawAddress == address(0)) {
withdrawAddress = msg.sender;
}
ssvToken.approve(msg.sender, amount);
ssvToken.transfer(withdrawAddress, amount);
}
modifier operatorOnly() {
require(msg.sender == operatorAddress, "Only Dxpool staking operator allowed");
_;
}
modifier adminOnly() {
require(msg.sender == adminAddress, "Only Dxpool staking admin allowed");
_;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import "../interfaces/ISSVClusters.sol";
struct SsvPayload {
uint256 currentNonce;
uint64[] operatorIds;
bytes[] sharesData;
ISSVClusters.Cluster cluster;
}
struct SsvDeposit {
bytes[] publicKeys;
uint256 ethAmount;
uint64[] operatorIds;
ISSVClusters.Cluster cluster;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import "./ISSVNetwork.sol";
import "../structs/DxpoolStructs.sol";
interface IDxpoolSSVBatchDeposit {
event FeeChanged(uint256 previousFee, uint256 newFee);
event Withdrawn(address indexed payee, uint256 weiAmount);
event FeeCollected(address indexed payee, uint256 weiAmount);
event SSVEthDepositExchangeUpdated(address indexed payee, uint64[] operatorIds, uint256 weiAmount, uint256 ssvAmount);
event SSVDepositToCluster(address indexed payee, bytes[] publicKeys, uint64[]operatorIds, uint256 weiAmount, uint256 ssvAmount);
event SSVPerExchangeRateUpdated(uint256 ssvPerExchangeRate_);
event OperatorUpdated(address operatorAddress);
event NonceUpdated(uint256 currentNonce_);
event SSVNetworkContractUpdated(address ssvNetwork_, address ssvToken_);
// Everyone can use those functions
function batchDepositAndRegisterValidators(
bytes calldata pubkeys,
bytes calldata withdrawal_credentials,
bytes calldata signatures,
bytes32[] calldata deposit_data_roots,
SsvPayload calldata ssvPayload
) external payable;
function depositToClusterByPayingEth(
bytes[] calldata publicKeys,
uint64[] calldata operatorIds,
ISSVNetwork.Cluster calldata cluster
) external payable;
function depositToClustersByPayingEth(
SsvDeposit[] calldata ssvDeposit
) external payable;
function maxValidators() external view returns (uint256);
function getSSVPerEthExchangeRate() external view returns (uint256);
function getCurrentNonce() external view returns (uint256);
function getSSVBalance() external view returns (uint256);
function getSSVNetworkContractAddress() external view returns (address);
function getSSVTokenContractAddress() external view returns (address);
// Only Operator can use those functions
function registerValidator(
bytes calldata publicKey,
uint64[] calldata operatorIds,
bytes calldata sharesData,
uint256 amount,
ISSVNetwork.Cluster calldata cluster
) external;
function bulkRegisterValidator(
bytes[] calldata publicKeys,
uint64[] calldata operatorIds,
bytes[] calldata sharesData,
uint256 amount,
ISSVNetwork.Cluster calldata cluster
) external;
function removeValidator(
bytes calldata publicKey,
uint64[] calldata operatorIds,
ISSVNetwork.Cluster calldata cluster
) external;
function bulkRemoveValidator(
bytes[] calldata publicKeys,
uint64[] calldata operatorIds,
ISSVNetwork.Cluster calldata cluster
) external;
function exitValidator(
bytes calldata publicKey,
uint64[] calldata operatorIds
) external;
function bulkExitValidator(
bytes[] calldata publicKeys,
uint64[] calldata operatorIds
) external;
function withdrawFromSSV(
uint64[] calldata operatorIds,
uint256 amount,
ISSVNetwork.Cluster calldata cluster
) external;
function liquidate(
uint64[] calldata operatorIds,
ISSVNetwork.Cluster calldata cluster
) external;
function reactivate(
uint64[] calldata operatorIds,
uint256 amount,
ISSVNetwork.Cluster calldata cluster
) external;
function depositToCluster(
uint64[] calldata operatorIds,
ISSVClusters.Cluster calldata cluster,
uint256 amount
) external ;
function setFeeReceiptAddress(
address ssvFeeReceiptAddress
) external;
function setSSVPerEthExchangeRate(uint256 rate) external;
// Only Admin can use those functions
function pauseContract() external;
function unpauseContract() external;
function changeMaxValidators(uint256 max) external;
function setCurrentNonce(uint256 currentNonce_) external;
function setOperatorAddress(address payable operatorAddress_) external;
function setSSVNetworkContract(address ssvNetwork_, address ssvToken_) external;
function withdrawEth(address payable withdrawAddress, uint256 amount) external;
function withdrawSSVToken(address withdrawAddress, uint256 amount) external;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import "./ISSVClusters.sol";
interface ISSVNetwork is ISSVClusters {
function setFeeRecipientAddress(address feeRecipientAddress) external;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
interface IDepositContract {
/// @notice A processed deposit event.
event DepositEvent(
bytes pubkey,
bytes withdrawal_credentials,
bytes amount,
bytes signature,
bytes index
);
/// @notice Submit a Phase 0 DepositData object.
/// @param pubkey A BLS12-381 public key.
/// @param withdrawal_credentials Commitment to a public key for withdrawals.
/// @param signature A BLS12-381 signature.
/// @param deposit_data_root The SHA-256 hash of the SSZ-encoded DepositData object.
/// Used as a protection against malformed input.
function deposit(
bytes calldata pubkey,
bytes calldata withdrawal_credentials,
bytes calldata signature,
bytes32 deposit_data_root
) external payable;
/// @notice Query the current deposit root hash.
/// @return The deposit root hash.
function get_deposit_root() external view returns (bytes32);
/// @notice Query the current deposit count.
/// @return The deposit count encoded as a little endian 64-bit number.
function get_deposit_count() external view returns (bytes memory);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/UUPSUpgradeable.sol)
pragma solidity ^0.8.20;
import {IERC1822Proxiable} from "../../interfaces/draft-IERC1822.sol";
import {ERC1967Utils} from "../ERC1967/ERC1967Utils.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.
*/
abstract contract UUPSUpgradeable is IERC1822Proxiable {
/// @custom:oz-upgrades-unsafe-allow state-variable-immutable
address private immutable __self = address(this);
/**
* @dev The version of the upgrade interface of the contract. If this getter is missing, both `upgradeTo(address)`
* and `upgradeToAndCall(address,bytes)` are present, and `upgradeTo` must be used if no function should be called,
* while `upgradeToAndCall` will invoke the `receive` function if the second argument is the empty byte string.
* If the getter returns `"5.0.0"`, only `upgradeToAndCall(address,bytes)` is present, and the second argument must
* be the empty byte string if no function should be called, making it impossible to invoke the `receive` function
* during an upgrade.
*/
string public constant UPGRADE_INTERFACE_VERSION = "5.0.0";
/**
* @dev The call is from an unauthorized context.
*/
error UUPSUnauthorizedCallContext();
/**
* @dev The storage `slot` is unsupported as a UUID.
*/
error UUPSUnsupportedProxiableUUID(bytes32 slot);
/**
* @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() {
_checkProxy();
_;
}
/**
* @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() {
_checkNotDelegated();
_;
}
/**
* @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 notDelegated returns (bytes32) {
return ERC1967Utils.IMPLEMENTATION_SLOT;
}
/**
* @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);
}
/**
* @dev Reverts if the execution is not performed via delegatecall or the execution
* context is not of a proxy with an ERC1967-compliant implementation pointing to self.
* See {_onlyProxy}.
*/
function _checkProxy() internal view virtual {
if (
address(this) == __self || // Must be called through delegatecall
ERC1967Utils.getImplementation() != __self // Must be called through an active proxy
) {
revert UUPSUnauthorizedCallContext();
}
}
/**
* @dev Reverts if the execution is performed via delegatecall.
* See {notDelegated}.
*/
function _checkNotDelegated() internal view virtual {
if (address(this) != __self) {
// Must not be called through delegatecall
revert UUPSUnauthorizedCallContext();
}
}
/**
* @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by
* {upgradeToAndCall}.
*
* Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.
*
* ```solidity
* function _authorizeUpgrade(address) internal onlyOwner {}
* ```
*/
function _authorizeUpgrade(address newImplementation) internal virtual;
/**
* @dev Performs an implementation upgrade with a security check for UUPS proxies, and additional setup call.
*
* As a security check, {proxiableUUID} is invoked in the new implementation, and the return value
* is expected to be the implementation slot in ERC1967.
*
* Emits an {IERC1967-Upgraded} event.
*/
function _upgradeToAndCallUUPS(address newImplementation, bytes memory data) private {
try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {
if (slot != ERC1967Utils.IMPLEMENTATION_SLOT) {
revert UUPSUnsupportedProxiableUUID(slot);
}
ERC1967Utils.upgradeToAndCall(newImplementation, data);
} catch {
// The implementation is not UUPS
revert ERC1967Utils.ERC1967InvalidImplementation(newImplementation);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.sol)
pragma solidity ^0.8.20;
/**
* @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
* behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
* external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
* function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
*
* The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
* reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
* case an upgrade adds a module that needs to be initialized.
*
* For example:
*
* [.hljs-theme-light.nopadding]
* ```solidity
* contract MyToken is ERC20Upgradeable {
* function initialize() initializer public {
* __ERC20_init("MyToken", "MTK");
* }
* }
*
* contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
* function initializeV2() reinitializer(2) public {
* __ERC20Permit_init("MyToken");
* }
* }
* ```
*
* TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
* possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
*
* CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
* that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
*
* [CAUTION]
* ====
* Avoid leaving a contract uninitialized.
*
* An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
* contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
* the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
*
* [.hljs-theme-light.nopadding]
* ```
* /// @custom:oz-upgrades-unsafe-allow constructor
* constructor() {
* _disableInitializers();
* }
* ```
* ====
*/
abstract contract Initializable {
/**
* @dev Storage of the initializable contract.
*
* It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions
* when using with upgradeable contracts.
*
* @custom:storage-location erc7201:openzeppelin.storage.Initializable
*/
struct InitializableStorage {
/**
* @dev Indicates that the contract has been initialized.
*/
uint64 _initialized;
/**
* @dev Indicates that the contract is in the process of being initialized.
*/
bool _initializing;
}
// keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Initializable")) - 1)) & ~bytes32(uint256(0xff))
bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00;
/**
* @dev The contract is already initialized.
*/
error InvalidInitialization();
/**
* @dev The contract is not initializing.
*/
error NotInitializing();
/**
* @dev Triggered when the contract has been initialized or reinitialized.
*/
event Initialized(uint64 version);
/**
* @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
* `onlyInitializing` functions can be used to initialize parent contracts.
*
* Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any
* number of times. This behavior in the constructor can be useful during testing and is not expected to be used in
* production.
*
* Emits an {Initialized} event.
*/
modifier initializer() {
// solhint-disable-next-line var-name-mixedcase
InitializableStorage storage $ = _getInitializableStorage();
// Cache values to avoid duplicated sloads
bool isTopLevelCall = !$._initializing;
uint64 initialized = $._initialized;
// Allowed calls:
// - initialSetup: the contract is not in the initializing state and no previous version was
// initialized
// - construction: the contract is initialized at version 1 (no reininitialization) and the
// current contract is just being deployed
bool initialSetup = initialized == 0 && isTopLevelCall;
bool construction = initialized == 1 && address(this).code.length == 0;
if (!initialSetup && !construction) {
revert InvalidInitialization();
}
$._initialized = 1;
if (isTopLevelCall) {
$._initializing = true;
}
_;
if (isTopLevelCall) {
$._initializing = false;
emit Initialized(1);
}
}
/**
* @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
* contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
* used to initialize parent contracts.
*
* A reinitializer may be used after the original initialization step. This is essential to configure modules that
* are added through upgrades and that require initialization.
*
* When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`
* cannot be nested. If one is invoked in the context of another, execution will revert.
*
* Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
* a contract, executing them in the right order is up to the developer or operator.
*
* WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization.
*
* Emits an {Initialized} event.
*/
modifier reinitializer(uint64 version) {
// solhint-disable-next-line var-name-mixedcase
InitializableStorage storage $ = _getInitializableStorage();
if ($._initializing || $._initialized >= version) {
revert InvalidInitialization();
}
$._initialized = version;
$._initializing = true;
_;
$._initializing = false;
emit Initialized(version);
}
/**
* @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
* {initializer} and {reinitializer} modifiers, directly or indirectly.
*/
modifier onlyInitializing() {
_checkInitializing();
_;
}
/**
* @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.
*/
function _checkInitializing() internal view virtual {
if (!_isInitializing()) {
revert NotInitializing();
}
}
/**
* @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
* Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
* to any version. It is recommended to use this to lock implementation contracts that are designed to be called
* through proxies.
*
* Emits an {Initialized} event the first time it is successfully executed.
*/
function _disableInitializers() internal virtual {
// solhint-disable-next-line var-name-mixedcase
InitializableStorage storage $ = _getInitializableStorage();
if ($._initializing) {
revert InvalidInitialization();
}
if ($._initialized != type(uint64).max) {
$._initialized = type(uint64).max;
emit Initialized(type(uint64).max);
}
}
/**
* @dev Returns the highest version that has been initialized. See {reinitializer}.
*/
function _getInitializedVersion() internal view returns (uint64) {
return _getInitializableStorage()._initialized;
}
/**
* @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.
*/
function _isInitializing() internal view returns (bool) {
return _getInitializableStorage()._initializing;
}
/**
* @dev Returns a pointer to the storage namespace.
*/
// solhint-disable-next-line var-name-mixedcase
function _getInitializableStorage() private pure returns (InitializableStorage storage $) {
assembly {
$.slot := INITIALIZABLE_STORAGE
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which allows children to implement an emergency stop
* mechanism that can be triggered by an authorized account.
*
* This module is used through inheritance. It will make available the
* modifiers `whenNotPaused` and `whenPaused`, which can be applied to
* the functions of your contract. Note that they will not be pausable by
* simply including this module, only once the modifiers are put in place.
*/
abstract contract Pausable is Context {
/**
* @dev Emitted when the pause is triggered by `account`.
*/
event Paused(address account);
/**
* @dev Emitted when the pause is lifted by `account`.
*/
event Unpaused(address account);
bool private _paused;
/**
* @dev Initializes the contract in unpaused state.
*/
constructor() {
_paused = false;
}
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*
* Requirements:
*
* - The contract must not be paused.
*/
modifier whenNotPaused() {
_requireNotPaused();
_;
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*
* Requirements:
*
* - The contract must be paused.
*/
modifier whenPaused() {
_requirePaused();
_;
}
/**
* @dev Returns true if the contract is paused, and false otherwise.
*/
function paused() public view virtual returns (bool) {
return _paused;
}
/**
* @dev Throws if the contract is paused.
*/
function _requireNotPaused() internal view virtual {
require(!paused(), "Pausable: paused");
}
/**
* @dev Throws if the contract is not paused.
*/
function _requirePaused() internal view virtual {
require(paused(), "Pausable: not paused");
}
/**
* @dev Triggers stopped state.
*
* Requirements:
*
* - The contract must not be paused.
*/
function _pause() internal virtual whenNotPaused {
_paused = true;
emit Paused(_msgSender());
}
/**
* @dev Returns to normal state.
*
* Requirements:
*
* - The contract must be paused.
*/
function _unpause() internal virtual whenPaused {
_paused = false;
emit Unpaused(_msgSender());
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.20;
/**
* @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 value of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the value of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens 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 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the
* allowance mechanism. `value` 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 value) external returns (bool);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
interface ISSVClusters {
/// @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;
}
/// @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: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)
pragma solidity ^0.8.20;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (proxy/ERC1967/ERC1967Utils.sol)
pragma solidity ^0.8.20;
import {IBeacon} from "../beacon/IBeacon.sol";
import {Address} from "../../utils/Address.sol";
import {StorageSlot} from "../../utils/StorageSlot.sol";
/**
* @dev This abstract contract provides getters and event emitting update functions for
* https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.
*/
library ERC1967Utils {
// We re-declare ERC-1967 events here because they can't be used directly from IERC1967.
// This will be fixed in Solidity 0.8.21. At that point we should remove these events.
/**
* @dev Emitted when the implementation is upgraded.
*/
event Upgraded(address indexed implementation);
/**
* @dev Emitted when the admin account has changed.
*/
event AdminChanged(address previousAdmin, address newAdmin);
/**
* @dev Emitted when the beacon is changed.
*/
event BeaconUpgraded(address indexed beacon);
/**
* @dev Storage slot with the address of the current implementation.
* This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1.
*/
// solhint-disable-next-line private-vars-leading-underscore
bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
/**
* @dev The `implementation` of the proxy is invalid.
*/
error ERC1967InvalidImplementation(address implementation);
/**
* @dev The `admin` of the proxy is invalid.
*/
error ERC1967InvalidAdmin(address admin);
/**
* @dev The `beacon` of the proxy is invalid.
*/
error ERC1967InvalidBeacon(address beacon);
/**
* @dev An upgrade function sees `msg.value > 0` that may be lost.
*/
error ERC1967NonPayable();
/**
* @dev Returns the current implementation address.
*/
function getImplementation() internal view returns (address) {
return StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value;
}
/**
* @dev Stores a new address in the EIP1967 implementation slot.
*/
function _setImplementation(address newImplementation) private {
if (newImplementation.code.length == 0) {
revert ERC1967InvalidImplementation(newImplementation);
}
StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value = newImplementation;
}
/**
* @dev Performs implementation upgrade with additional setup call if data is nonempty.
* This function is payable only if the setup call is performed, otherwise `msg.value` is rejected
* to avoid stuck value in the contract.
*
* Emits an {IERC1967-Upgraded} event.
*/
function upgradeToAndCall(address newImplementation, bytes memory data) internal {
_setImplementation(newImplementation);
emit Upgraded(newImplementation);
if (data.length > 0) {
Address.functionDelegateCall(newImplementation, data);
} else {
_checkNonPayable();
}
}
/**
* @dev Storage slot with the admin of the contract.
* This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1.
*/
// solhint-disable-next-line private-vars-leading-underscore
bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;
/**
* @dev Returns the current admin.
*
* TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using
* the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.
* `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`
*/
function getAdmin() internal view returns (address) {
return StorageSlot.getAddressSlot(ADMIN_SLOT).value;
}
/**
* @dev Stores a new address in the EIP1967 admin slot.
*/
function _setAdmin(address newAdmin) private {
if (newAdmin == address(0)) {
revert ERC1967InvalidAdmin(address(0));
}
StorageSlot.getAddressSlot(ADMIN_SLOT).value = newAdmin;
}
/**
* @dev Changes the admin of the proxy.
*
* Emits an {IERC1967-AdminChanged} event.
*/
function changeAdmin(address newAdmin) internal {
emit AdminChanged(getAdmin(), newAdmin);
_setAdmin(newAdmin);
}
/**
* @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.
* This is the keccak-256 hash of "eip1967.proxy.beacon" subtracted by 1.
*/
// solhint-disable-next-line private-vars-leading-underscore
bytes32 internal constant BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;
/**
* @dev Returns the current beacon.
*/
function getBeacon() internal view returns (address) {
return StorageSlot.getAddressSlot(BEACON_SLOT).value;
}
/**
* @dev Stores a new beacon in the EIP1967 beacon slot.
*/
function _setBeacon(address newBeacon) private {
if (newBeacon.code.length == 0) {
revert ERC1967InvalidBeacon(newBeacon);
}
StorageSlot.getAddressSlot(BEACON_SLOT).value = newBeacon;
address beaconImplementation = IBeacon(newBeacon).implementation();
if (beaconImplementation.code.length == 0) {
revert ERC1967InvalidImplementation(beaconImplementation);
}
}
/**
* @dev Change the beacon and trigger a setup call if data is nonempty.
* This function is payable only if the setup call is performed, otherwise `msg.value` is rejected
* to avoid stuck value in the contract.
*
* Emits an {IERC1967-BeaconUpgraded} event.
*
* CAUTION: Invoking this function has no effect on an instance of {BeaconProxy} since v5, since
* it uses an immutable beacon without looking at the value of the ERC-1967 beacon slot for
* efficiency.
*/
function upgradeBeaconToAndCall(address newBeacon, bytes memory data) internal {
_setBeacon(newBeacon);
emit BeaconUpgraded(newBeacon);
if (data.length > 0) {
Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);
} else {
_checkNonPayable();
}
}
/**
* @dev Reverts if `msg.value` is not zero. It can be used to avoid `msg.value` stuck in the contract
* if an upgrade doesn't perform an initialization call.
*/
function _checkNonPayable() private {
if (msg.value > 0) {
revert ERC1967NonPayable();
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC1822.sol)
pragma solidity ^0.8.20;
/**
* @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified
* proxy whose upgrades are fully controlled by the current implementation.
*/
interface IERC1822Proxiable {
/**
* @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation
* address.
*
* IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks
* bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this
* function revert if invoked through a proxy.
*/
function proxiableUUID() external view returns (bytes32);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/StorageSlot.sol)
// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.
pragma solidity ^0.8.20;
/**
* @dev Library for reading and writing primitive types to specific storage slots.
*
* Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.
* This library helps with reading and writing to such slots without the need for inline assembly.
*
* The functions in this library return Slot structs that contain a `value` member that can be used to read or write.
*
* Example usage to set ERC1967 implementation slot:
* ```solidity
* contract ERC1967 {
* bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
*
* function _getImplementation() internal view returns (address) {
* return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
* }
*
* function _setImplementation(address newImplementation) internal {
* require(newImplementation.code.length > 0);
* StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
* }
* }
* ```
*/
library StorageSlot {
struct AddressSlot {
address value;
}
struct BooleanSlot {
bool value;
}
struct Bytes32Slot {
bytes32 value;
}
struct Uint256Slot {
uint256 value;
}
struct StringSlot {
string value;
}
struct BytesSlot {
bytes value;
}
/**
* @dev Returns an `AddressSlot` with member `value` located at `slot`.
*/
function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `BooleanSlot` with member `value` located at `slot`.
*/
function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `Bytes32Slot` with member `value` located at `slot`.
*/
function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `Uint256Slot` with member `value` located at `slot`.
*/
function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `StringSlot` with member `value` located at `slot`.
*/
function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `StringSlot` representation of the string storage pointer `store`.
*/
function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := store.slot
}
}
/**
* @dev Returns an `BytesSlot` with member `value` located at `slot`.
*/
function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.
*/
function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := store.slot
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol)
pragma solidity ^0.8.20;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev The ETH balance of the account is not enough to perform the operation.
*/
error AddressInsufficientBalance(address account);
/**
* @dev There's no code at `target` (it is not a contract).
*/
error AddressEmptyCode(address target);
/**
* @dev A call to an address target failed. The target may have reverted.
*/
error FailedInnerCall();
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
if (address(this).balance < amount) {
revert AddressInsufficientBalance(address(this));
}
(bool success, ) = recipient.call{value: amount}("");
if (!success) {
revert FailedInnerCall();
}
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason or custom error, it is bubbled
* up by this function (like regular Solidity function calls). However, if
* the call reverted with no returned reason, this function reverts with a
* {FailedInnerCall} error.
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
if (address(this).balance < value) {
revert AddressInsufficientBalance(address(this));
}
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
* was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an
* unsuccessful call.
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata
) internal view returns (bytes memory) {
if (!success) {
_revert(returndata);
} else {
// only check if target is a contract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
if (returndata.length == 0 && target.code.length == 0) {
revert AddressEmptyCode(target);
}
return returndata;
}
}
/**
* @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
* revert reason or with a default {FailedInnerCall} error.
*/
function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
if (!success) {
_revert(returndata);
} else {
return returndata;
}
}
/**
* @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}.
*/
function _revert(bytes memory returndata) private pure {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert FailedInnerCall();
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (proxy/beacon/IBeacon.sol)
pragma solidity ^0.8.20;
/**
* @dev This is the interface that {BeaconProxy} expects of its beacon.
*/
interface IBeacon {
/**
* @dev Must return an address that can be used as a delegate call target.
*
* {UpgradeableBeacon} will check that this address is a contract.
*/
function implementation() external view returns (address);
}{
"optimizer": {
"enabled": true,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}Contract Security Audit
- QuillAudit - Sept 19th, 2024 - Security Audit Report
Contract ABI
API[{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"implementation","type":"address"}],"name":"ERC1967InvalidImplementation","type":"error"},{"inputs":[],"name":"ERC1967NonPayable","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"inputs":[],"name":"UUPSUnauthorizedCallContext","type":"error"},{"inputs":[{"internalType":"bytes32","name":"slot","type":"bytes32"}],"name":"UUPSUnsupportedProxiableUUID","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"previousFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newFee","type":"uint256"}],"name":"FeeChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"payee","type":"address"},{"indexed":false,"internalType":"uint256","name":"weiAmount","type":"uint256"}],"name":"FeeCollected","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"currentNonce_","type":"uint256"}],"name":"NonceUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"operatorAddress","type":"address"}],"name":"OperatorUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"payee","type":"address"},{"indexed":false,"internalType":"bytes[]","name":"publicKeys","type":"bytes[]"},{"indexed":false,"internalType":"uint64[]","name":"operatorIds","type":"uint64[]"},{"indexed":false,"internalType":"uint256","name":"weiAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"ssvAmount","type":"uint256"}],"name":"SSVDepositToCluster","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"payee","type":"address"},{"indexed":false,"internalType":"uint64[]","name":"operatorIds","type":"uint64[]"},{"indexed":false,"internalType":"uint256","name":"weiAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"ssvAmount","type":"uint256"}],"name":"SSVEthDepositExchangeUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"ssvNetwork_","type":"address"},{"indexed":false,"internalType":"address","name":"ssvToken_","type":"address"}],"name":"SSVNetworkContractUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"ssvPerExchangeRate_","type":"uint256"}],"name":"SSVPerExchangeRateUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","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":"payee","type":"address"},{"indexed":false,"internalType":"uint256","name":"weiAmount","type":"uint256"}],"name":"Withdrawn","type":"event"},{"inputs":[],"name":"UPGRADE_INTERFACE_VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"pubkeys","type":"bytes"},{"internalType":"bytes","name":"withdrawal_credentials","type":"bytes"},{"internalType":"bytes","name":"signatures","type":"bytes"},{"internalType":"bytes32[]","name":"deposit_data_roots","type":"bytes32[]"},{"components":[{"internalType":"uint256","name":"currentNonce","type":"uint256"},{"internalType":"uint64[]","name":"operatorIds","type":"uint64[]"},{"internalType":"bytes[]","name":"sharesData","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"}],"internalType":"struct ISSVClusters.Cluster","name":"cluster","type":"tuple"}],"internalType":"struct SsvPayload","name":"ssvPayload","type":"tuple"}],"name":"batchDepositAndRegisterValidators","outputs":[],"stateMutability":"payable","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 ISSVClusters.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 ISSVClusters.Cluster","name":"cluster","type":"tuple"}],"name":"bulkRemoveValidator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"max","type":"uint256"}],"name":"changeMaxValidators","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"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 ISSVClusters.Cluster","name":"cluster","type":"tuple"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"depositToCluster","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 ISSVClusters.Cluster","name":"cluster","type":"tuple"}],"name":"depositToClusterByPayingEth","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"bytes[]","name":"publicKeys","type":"bytes[]"},{"internalType":"uint256","name":"ethAmount","type":"uint256"},{"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 ISSVClusters.Cluster","name":"cluster","type":"tuple"}],"internalType":"struct SsvDeposit[]","name":"ssvDeposit","type":"tuple[]"}],"name":"depositToClustersByPayingEth","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes","name":"publicKey","type":"bytes"},{"internalType":"uint64[]","name":"operatorIds","type":"uint64[]"}],"name":"exitValidator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getCurrentNonce","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSSVBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSSVNetworkContractAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSSVPerEthExchangeRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSSVTokenContractAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"officialDepositContract_","type":"address"},{"internalType":"address","name":"operatorAddress_","type":"address"},{"internalType":"address","name":"adminAddress_","type":"address"},{"internalType":"address","name":"ssvNetworkAddress_","type":"address"},{"internalType":"address","name":"ssvTokenAddress_","type":"address"},{"internalType":"address","name":"feeRecipientAddress_","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"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 ISSVClusters.Cluster","name":"cluster","type":"tuple"}],"name":"liquidate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"maxValidators","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pauseContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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 ISSVClusters.Cluster","name":"cluster","type":"tuple"}],"name":"reactivate","outputs":[],"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 ISSVClusters.Cluster","name":"cluster","type":"tuple"}],"name":"registerValidator","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 ISSVClusters.Cluster","name":"cluster","type":"tuple"}],"name":"removeValidator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"currentNonce_","type":"uint256"}],"name":"setCurrentNonce","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"ssvFeeReceiptAddress","type":"address"}],"name":"setFeeReceiptAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"operatorAddress_","type":"address"}],"name":"setOperatorAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"ssvNetwork_","type":"address"},{"internalType":"address","name":"ssvToken_","type":"address"}],"name":"setSSVNetworkContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"rate","type":"uint256"}],"name":"setSSVPerEthExchangeRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpauseContract","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":"address payable","name":"withdrawAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawEth","outputs":[],"stateMutability":"nonpayable","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 ISSVClusters.Cluster","name":"cluster","type":"tuple"}],"name":"withdrawFromSSV","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"withdrawAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawSSVToken","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
60a060405230608052348015610013575f80fd5b505f805460ff191690556080516132836100435f395f8181611f5401528181611f7d01526120e101526132835ff3fe6080604052600436106101f1575f3560e01c80635c975abb11610108578063ad3cb1cc1161009d578063d95df9d61161006d578063d95df9d614610553578063dadc424114610572578063e2a73c5014610586578063e98bc7dd146105a5578063f97afa0c146105b8575f80fd5b8063ad3cb1cc146104c6578063b33712c514610503578063be66067914610517578063cc2a9a5b14610534575f80fd5b80639d97366b116100d85780639d97366b14610456578063a1dc1e2a14610469578063a78a5e6514610488578063a7d366b1146104a7575f80fd5b80635c975abb146103d15780635fec6dd0146103f25780637877f95a1461041157806380ca4eb114610442575f80fd5b806332afd02f1161018957806347b94fe81161015957806347b94fe8146103595780634f1ef2861461037857806352d1902d1461038b5780635981a0711461039f5780635aed1142146103b2575f80fd5b806332afd02f146102f35780633877322b146103125780633a60c38614610331578063439766ce14610345575f80fd5b80631b9a91a4116101c45780631b9a91a41461027757806322f18bf514610296578063247b9689146102b55780632f1d5a60146102d4575f80fd5b806305c1efdd146101f557806306e8fb9c1461021657806308ac52561461023557806312b3fc1914610258575b5f80fd5b348015610200575f80fd5b5061021461020f3660046123cb565b6105d7565b005b348015610221575f80fd5b5061021461023036600461249c565b61067b565b348015610240575f80fd5b506003545b6040519081526020015b60405180910390f35b348015610263575f80fd5b50610214610272366004612548565b610731565b348015610282575f80fd5b506102146102913660046125c3565b6107c7565b3480156102a1575f80fd5b506102146102b03660046125ed565b6108e8565b3480156102c0575f80fd5b506102146102cf366004612670565b6109a2565b3480156102df575f80fd5b506102146102ee3660046126c8565b610a37565b3480156102fe575f80fd5b5061021461030d3660046126e3565b610abf565b34801561031d575f80fd5b5061021461032c366004612749565b610b1f565b34801561033c575f80fd5b50600754610245565b348015610350575f80fd5b50610214610b7f565b348015610364575f80fd5b506102146103733660046125c3565b610bb3565b610214610386366004612792565b610cd6565b348015610396575f80fd5b50610245610cf5565b6102146103ad366004612860565b610d10565b3480156103bd575f80fd5b506102146103cc36600461293b565b61145e565b3480156103dc575f80fd5b505f5460ff16604051901515815260200161024f565b3480156103fd575f80fd5b5061021461040c366004612971565b6114c0565b34801561041c575f80fd5b506006546001600160a01b03165b6040516001600160a01b03909116815260200161024f565b34801561044d575f80fd5b50610245611520565b6102146104643660046129ca565b61158f565b348015610474575f80fd5b50610214610483366004612a08565b61181f565b348015610493575f80fd5b506102146104a2366004612a08565b611901565b3480156104b2575f80fd5b506102146104c1366004612a08565b611963565b3480156104d1575f80fd5b506104f6604051806040016040528060058152602001640352e302e360dc1b81525081565b60405161024f9190612a6c565b34801561050e575f80fd5b506102146119c5565b348015610522575f80fd5b506005546001600160a01b031661042a565b34801561053f575f80fd5b5061021461054e366004612a7e565b6119f7565b34801561055e575f80fd5b5061021461056d366004612971565b611c36565b34801561057d575f80fd5b50600454610245565b348015610591575f80fd5b506102146105a0366004612afc565b611c96565b6102146105b336600461293b565b611d28565b3480156105c3575f80fd5b506102146105d23660046126c8565b611e69565b6002546001600160a01b0316331461060a5760405162461bcd60e51b815260040161060190612b4c565b60405180910390fd5b604080516001600160a01b038085168252831660208201527f792440ee82feb5f73482c8a3007e7ada2cc30f25cdfa6fb4f373b08555baea54910160405180910390a1600580546001600160a01b039384166001600160a01b03199182161790915560068054929093169116179055565b6001546001600160a01b031633146106a55760405162461bcd60e51b815260040161060190612b8d565b6005546040516301ba3ee760e21b81526001600160a01b03909116906306e8fb9c906106e3908b908b908b908b908b908b908b908b90600401612cce565b5f604051808303815f87803b1580156106fa575f80fd5b505af115801561070c573d5f803e3d5ffd5b50505050600160075f8282546107229190612d43565b90915550505050505050505050565b6001546001600160a01b0316331461075b5760405162461bcd60e51b815260040161060190612b8d565b6005546040516312b3fc1960e01b81526001600160a01b03909116906312b3fc19906107939088908890889088908890600401612d56565b5f604051808303815f87803b1580156107aa575f80fd5b505af11580156107bc573d5f803e3d5ffd5b505050505050505050565b6002546001600160a01b031633146107f15760405162461bcd60e51b815260040161060190612b4c565b6001600160a01b038216610803573391505b8047101561086d5760405162461bcd60e51b815260206004820152603160248201527f776974686472617720616d6f756e74206d757374206265206c657373207468616044820152706e20616464726573732062616c616e636560781b6064820152608401610601565b816001600160a01b03167f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5826040516108a891815260200190565b60405180910390a26040516001600160a01b0383169082156108fc029083905f818181858888f193505050501580156108e3573d5f803e3d5ffd5b505050565b6001546001600160a01b031633146109125760405162461bcd60e51b815260040161060190612b8d565b6005546040516322f18bf560e01b81526001600160a01b03909116906322f18bf590610950908b908b908b908b908b908b908b908b90600401612e22565b5f604051808303815f87803b158015610967575f80fd5b505af1158015610979573d5f803e3d5ffd5b5050600780548a93508392505f90610992908490612d43565b9091555050505050505050505050565b6001546001600160a01b031633146109cc5760405162461bcd60e51b815260040161060190612b8d565b60055460405163bc26e7e560e01b81526001600160a01b039091169063bc26e7e590610a049030908890889087908990600401612e60565b5f604051808303815f87803b158015610a1b575f80fd5b505af1158015610a2d573d5f803e3d5ffd5b5050505050505050565b6002546001600160a01b03163314610a615760405162461bcd60e51b815260040161060190612b4c565b6040516001600160a01b03821681527fb3b3f5f64ab192e4b5fefde1f51ce9733bbdcf831951543b325aebd49cc27ec49060200160405180910390a1600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b03163314610ae95760405162461bcd60e51b815260040161060190612b8d565b6005546040516332afd02f60e01b81526001600160a01b03909116906332afd02f90610a04908790879087908790600401612e9b565b6001546001600160a01b03163314610b495760405162461bcd60e51b815260040161060190612b8d565b600554604051633877322b60e01b81526001600160a01b0390911690633877322b90610a04908790879087908790600401612ecc565b6002546001600160a01b03163314610ba95760405162461bcd60e51b815260040161060190612b4c565b610bb1611ef0565b565b6002546001600160a01b03163314610bdd5760405162461bcd60e51b815260040161060190612b4c565b6001600160a01b038216610bef573391505b60065460405163095ea7b360e01b8152336004820152602481018390526001600160a01b039091169063095ea7b3906044016020604051808303815f875af1158015610c3d573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610c619190612edf565b5060065460405163a9059cbb60e01b81526001600160a01b038481166004830152602482018490529091169063a9059cbb906044016020604051808303815f875af1158015610cb2573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108e39190612edf565b610cde611f49565b610ce782611fed565b610cf1828261201a565b5050565b5f610cfe6120d6565b505f8051602061322e83398151915290565b610d1861211f565b600754813514610d815760405162461bcd60e51b815260206004820152602e60248201527f42617463684465706f73697420416e642052656769737465723a204e6f6e636560448201526d081b5d5cdd08189948195c5d585b60921b6064820152608401610601565b818015801590610d9357506003548111155b610e2b5760405162461bcd60e51b815260206004820152605c60248201527f42617463684465706f73697420416e642052656769737465723a20596f75207360448201527f686f756c64206465706f736974206174206c65617374206f6e652076616c696460648201527f61746f7220616e64206e6f74207265616368206d6178206c696d697400000000608482015260a401610601565b610e36603082612efa565b8914610e9e5760405162461bcd60e51b815260206004820152603160248201527f42617463684465706f73697420416e642052656769737465723a205075626b656044820152700f240c6deeadce840dcdee840dac2e8c6d607b1b6064820152608401610601565b610ea9606082612efa565b8514610f155760405162461bcd60e51b815260206004820152603560248201527f42617463684465706f73697420416e642052656769737465723a205369676e616044820152740e8eae4cae640c6deeadce840dcdee840dac2e8c6d605b1b6064820152608401610601565b610f2160206001612efa565b8714610fa15760405162461bcd60e51b815260206004820152604360248201527f42617463684465706f73697420416e642052656769737465723a20576974686460448201527f726177616c2043726564656e7469616c7320636f756e7420646f6e2774206d616064820152620e8c6d60eb1b608482015260a401610601565b610fae6040830183612f11565b9050811461101d5760405162461bcd60e51b815260206004820152603660248201527f42617463684465706f73697420416e642052656769737465723a2073686172656044820152750e688c2e8c240d8cadccee8d040dcdee840dac2e8c6d60531b6064820152608401610601565b5f816001600160401b038111156110365761103661277e565b60405190808252806020026020018201604052801561106957816020015b60608152602001906001900390816110545790505b5090505f5b82811015611204575f8c8c611084603085612efa565b906030611092866001612d43565b61109c9190612efa565b926110a993929190612f56565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201829052509394508c92508b91506110ee9050606086612efa565b9060606110fc876001612d43565b6111069190612efa565b9261111393929190612f56565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201829052505493945050506101009091046001600160a01b0316905063228951186801bc16d674ec800000848f8f868e8e8b81811061117e5761117e612f7d565b905060200201356040518763ffffffff1660e01b81526004016111a5959493929190612f91565b5f604051808303818588803b1580156111bc575f80fd5b505af11580156111ce573d5f803e3d5ffd5b5050505050818484815181106111e6576111e6612f7d565b60200260200101819052505050806111fd90612fdd565b905061106e565b505f611219836801bc16d674ec800000612efa565b6112239034612ff5565b90505f60045482670de0b6b3a764000061123d9190612efa565b6112479190613008565b90505f82116112be5760405162461bcd60e51b815260206004820152603d60248201527f42617463684465706f7369742057697468205353563a2073737620746f6b656e60448201527f20616d6f756e74206d75737420626967676572207468616e207a65726f0000006064820152608401610601565b8360010361136f576005546001600160a01b03166306e8fb9c8e8e6112e660208a018a612f11565b6112f360408c018c612f11565b5f81811061130357611303612f7d565b90506020028101906113159190613027565b888d6060016040518963ffffffff1660e01b815260040161133d989796959493929190612cce565b5f604051808303815f87803b158015611354575f80fd5b505af1158015611366573d5f803e3d5ffd5b505050506113f0565b6005546001600160a01b03166322f18bf58461138e6020890189612f11565b61139b60408b018b612f11565b878c6060016040518863ffffffff1660e01b81526004016113c29796959493929190613069565b5f604051808303815f87803b1580156113d9575f80fd5b505af11580156113eb573d5f803e3d5ffd5b505050505b337f8ae1e265d0fd330fbb811ff76ac8ae358c0c454ab3cdd71d795ea8cbbbcf828661141f6020880188612f11565b8585604051611431949392919061310e565b60405180910390a28360075f82825461144a9190612d43565b909155505050505050505050505050505050565b6001546001600160a01b031633146114885760405162461bcd60e51b815260040161060190612b8d565b600554604051632d7688a160e11b81526001600160a01b0390911690635aed1142906107939088908890889088908890600401613134565b6001546001600160a01b031633146114ea5760405162461bcd60e51b815260040161060190612b8d565b6005546040516305fec6dd60e41b81526001600160a01b0390911690635fec6dd090610a04908790879087908790600401613147565b6006546040516370a0823160e01b81523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015611566573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061158a9190613178565b905090565b5f805b828110156117a8575f6004548585848181106115b0576115b0612f7d565b90506020028101906115c2919061318f565b6115d89060200135670de0b6b3a7640000612efa565b6115e29190613008565b6005549091506001600160a01b031663bc26e7e53087878681811061160957611609612f7d565b905060200281019061161b919061318f565b611629906040810190612f11565b858a8a8981811061163c5761163c612f7d565b905060200281019061164e919061318f565b6060016040518663ffffffff1660e01b8152600401611671959493929190612e60565b5f604051808303815f87803b158015611688575f80fd5b505af115801561169a573d5f803e3d5ffd5b505050508484838181106116b0576116b0612f7d565b90506020028101906116c2919061318f565b6116d0906020013584612d43565b9250337f5f6aa5154aebbcb31c00623ce48195b21d4d2508badf2a5e1f3b512b06eadf9686868581811061170657611706612f7d565b9050602002810190611718919061318f565b6117229080612f11565b88888781811061173457611734612f7d565b9050602002810190611746919061318f565b611754906040810190612f11565b8a8a8981811061176657611766612f7d565b9050602002810190611778919061318f565b602001358760405161178f969594939291906131ad565b60405180910390a2506117a181612fdd565b9050611592565b50348111156108e35760405162461bcd60e51b815260206004820152603960248201527f546865206e756d626572206f6620657468206d757374206265206c657373207460448201527f68616e206f7220657175616c20746f206d73672e76616c7565000000000000006064820152608401610601565b6002546001600160a01b031633146118495760405162461bcd60e51b815260040161060190612b4c565b60035481036118b45760405162461bcd60e51b815260206004820152603160248201527f6d61782076616c696461746f7273206d75737420626520646966666572656e746044820152702066726f6d2063757272656e74206f6e6560781b6064820152608401610601565b5f81116118fc5760405162461bcd60e51b815260206004820152601660248201527504d6178206d75737420626967676572207468616e20360541b6044820152606401610601565b600355565b6001546001600160a01b0316331461192b5760405162461bcd60e51b815260040161060190612b8d565b6040518181527f4c91e198a90c69c3a662746627f8e6f4b96b582f6acd7e906abc903d80131e389060200160405180910390a1600455565b6002546001600160a01b0316331461198d5760405162461bcd60e51b815260040161060190612b4c565b6040518181527fc6f316165836b9a9ca658ba2e3bbf32b3acff9aca1956fc77393fb506d26b0d69060200160405180910390a1600755565b6002546001600160a01b031633146119ef5760405162461bcd60e51b815260040161060190612b4c565b610bb1612164565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff1615906001600160401b03165f81158015611a3b5750825b90505f826001600160401b03166001148015611a565750303b155b905081158015611a64575080155b15611a825760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff191660011785558315611aac57845460ff60401b1916600160401b1785555b60646003555f8054610100600160a81b0319166101006001600160a01b038e81169190910291909117909155662386f26fc100006004908155600180546001600160a01b03199081168e8516179091556002805482168d85161790556005805482168c851690811790915560068054909216938b1693841790915560405163095ea7b360e01b8152918201525f19602482015263095ea7b3906044016020604051808303815f875af1158015611b64573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b889190612edf565b506005546040516336f370b360e21b81526001600160a01b0388811660048301529091169063dbcdc2cc906024015f604051808303815f87803b158015611bcd575f80fd5b505af1158015611bdf573d5f803e3d5ffd5b505050508315611c2957845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050505050565b6001546001600160a01b03163314611c605760405162461bcd60e51b815260040161060190612b8d565b600554604051631a1b9a0b60e21b81526001600160a01b039091169063686e682c90610a04908790879087908790600401613147565b6001546001600160a01b03163314611cc05760405162461bcd60e51b815260040161060190612b8d565b600554604051635f8797d960e11b81526001600160a01b039091169063bf0f2fb290611cf69030908790879087906004016131e9565b5f604051808303815f87803b158015611d0d575f80fd5b505af1158015611d1f573d5f803e3d5ffd5b50505050505050565b6004545f90611d3f34670de0b6b3a7640000612efa565b611d499190613008565b90505f8111611db15760405162461bcd60e51b815260206004820152602e60248201527f546865206e756d626572206f662073737620616d6f756e74206d75737420626560448201526d020626967676572207468616e20360941b6064820152608401610601565b336001600160a01b03167f5f6aa5154aebbcb31c00623ce48195b21d4d2508badf2a5e1f3b512b06eadf96878787873487604051611df4969594939291906131ad565b60405180910390a260055460405163bc26e7e560e01b81526001600160a01b039091169063bc26e7e590611e349030908890889087908990600401612e60565b5f604051808303815f87803b158015611e4b575f80fd5b505af1158015611e5d573d5f803e3d5ffd5b50505050505050505050565b6001546001600160a01b03163314611e935760405162461bcd60e51b815260040161060190612b8d565b6005546040516336f370b360e21b81526001600160a01b0383811660048301529091169063dbcdc2cc906024015f604051808303815f87803b158015611ed7575f80fd5b505af1158015611ee9573d5f803e3d5ffd5b5050505050565b611ef861211f565b5f805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611f2c3390565b6040516001600160a01b03909116815260200160405180910390a1565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161480611fcf57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316611fc35f8051602061322e833981519152546001600160a01b031690565b6001600160a01b031614155b15610bb15760405163703e46dd60e11b815260040160405180910390fd5b6002546001600160a01b031633146120175760405162461bcd60e51b815260040161060190612b4c565b50565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015612074575060408051601f3d908101601f1916820190925261207191810190613178565b60015b61209c57604051634c9c8ce360e01b81526001600160a01b0383166004820152602401610601565b5f8051602061322e83398151915281146120cc57604051632a87526960e21b815260048101829052602401610601565b6108e3838361219c565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610bb15760405163703e46dd60e11b815260040160405180910390fd5b5f5460ff1615610bb15760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610601565b61216c6121f1565b5f805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33611f2c565b6121a582612239565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a28051156121e9576108e3828261229c565b610cf1612310565b5f5460ff16610bb15760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610601565b806001600160a01b03163b5f0361226e57604051634c9c8ce360e01b81526001600160a01b0382166004820152602401610601565b5f8051602061322e83398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b60605f80846001600160a01b0316846040516122b8919061321c565b5f60405180830381855af49150503d805f81146122f0576040519150601f19603f3d011682016040523d82523d5f602084013e6122f5565b606091505b509150915061230585838361232f565b925050505b92915050565b3415610bb15760405163b398979f60e01b815260040160405180910390fd5b6060826123445761233f8261238e565b612387565b815115801561235b57506001600160a01b0384163b155b1561238457604051639996b31560e01b81526001600160a01b0385166004820152602401610601565b50805b9392505050565b80511561239e5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b6001600160a01b0381168114612017575f80fd5b5f80604083850312156123dc575f80fd5b82356123e7816123b7565b915060208301356123f7816123b7565b809150509250929050565b5f8083601f840112612412575f80fd5b5081356001600160401b03811115612428575f80fd5b60208301915083602082850101111561243f575f80fd5b9250929050565b5f8083601f840112612456575f80fd5b5081356001600160401b0381111561246c575f80fd5b6020830191508360208260051b850101111561243f575f80fd5b5f60a08284031215612496575f80fd5b50919050565b5f805f805f805f80610120898b0312156124b4575f80fd5b88356001600160401b03808211156124ca575f80fd5b6124d68c838d01612402565b909a50985060208b01359150808211156124ee575f80fd5b6124fa8c838d01612446565b909850965060408b0135915080821115612512575f80fd5b5061251f8b828c01612402565b909550935050606089013591506125398a60808b01612486565b90509295985092959890939650565b5f805f805f60e0868803121561255c575f80fd5b85356001600160401b0380821115612572575f80fd5b61257e89838a01612402565b90975095506020880135915080821115612596575f80fd5b506125a388828901612446565b90945092506125b790508760408801612486565b90509295509295909350565b5f80604083850312156125d4575f80fd5b82356125df816123b7565b946020939093013593505050565b5f805f805f805f80610120898b031215612605575f80fd5b88356001600160401b038082111561261b575f80fd5b6126278c838d01612446565b909a50985060208b013591508082111561263f575f80fd5b61264b8c838d01612446565b909850965060408b0135915080821115612663575f80fd5b5061251f8b828c01612446565b5f805f8060e08587031215612683575f80fd5b84356001600160401b03811115612698575f80fd5b6126a487828801612446565b90955093506126b890508660208701612486565b9396929550929360c00135925050565b5f602082840312156126d8575f80fd5b8135612387816123b7565b5f805f80604085870312156126f6575f80fd5b84356001600160401b038082111561270c575f80fd5b61271888838901612446565b90965094506020870135915080821115612730575f80fd5b5061273d87828801612446565b95989497509550505050565b5f805f806040858703121561275c575f80fd5b84356001600160401b0380821115612772575f80fd5b61271888838901612402565b634e487b7160e01b5f52604160045260245ffd5b5f80604083850312156127a3575f80fd5b82356127ae816123b7565b915060208301356001600160401b03808211156127c9575f80fd5b818501915085601f8301126127dc575f80fd5b8135818111156127ee576127ee61277e565b604051601f8201601f19908116603f011681019083821181831017156128165761281661277e565b8160405282815288602084870101111561282e575f80fd5b826020860160208301375f6020848301015280955050505050509250929050565b5f6101008284031215612496575f80fd5b5f805f805f805f805f60a08a8c031215612878575f80fd5b89356001600160401b038082111561288e575f80fd5b61289a8d838e01612402565b909b50995060208c01359150808211156128b2575f80fd5b6128be8d838e01612402565b909950975060408c01359150808211156128d6575f80fd5b6128e28d838e01612402565b909750955060608c01359150808211156128fa575f80fd5b6129068d838e01612446565b909550935060808c013591508082111561291e575f80fd5b5061292b8c828d0161284f565b9150509295985092959850929598565b5f805f805f60e0868803121561294f575f80fd5b85356001600160401b0380821115612965575f80fd5b61257e89838a01612446565b5f805f8060e08587031215612984575f80fd5b84356001600160401b03811115612999575f80fd5b6129a587828801612446565b909550935050602085013591506129bf8660408701612486565b905092959194509250565b5f80602083850312156129db575f80fd5b82356001600160401b038111156129f0575f80fd5b6129fc85828601612446565b90969095509350505050565b5f60208284031215612a18575f80fd5b5035919050565b5f5b83811015612a39578181015183820152602001612a21565b50505f910152565b5f8151808452612a58816020860160208601612a1f565b601f01601f19169290920160200192915050565b602081525f6123876020830184612a41565b5f805f805f8060c08789031215612a93575f80fd5b8635612a9e816123b7565b95506020870135612aae816123b7565b94506040870135612abe816123b7565b93506060870135612ace816123b7565b92506080870135612ade816123b7565b915060a0870135612aee816123b7565b809150509295509295509295565b5f805f60c08486031215612b0e575f80fd5b83356001600160401b03811115612b23575f80fd5b612b2f86828701612446565b9094509250612b4390508560208601612486565b90509250925092565b60208082526021908201527f4f6e6c79204478706f6f6c207374616b696e672061646d696e20616c6c6f77656040820152601960fa1b606082015260800190565b60208082526024908201527f4f6e6c79204478706f6f6c207374616b696e67206f70657261746f7220616c6c6040820152631bddd95960e21b606082015260800190565b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b80356001600160401b0381168114612c0f575f80fd5b919050565b8183525f60208085019450825f5b85811015612c4e576001600160401b03612c3b83612bf9565b1687529582019590820190600101612c22565b509495945050505050565b8015158114612017575f80fd5b803563ffffffff8116808214612c7a575f80fd5b835250612c8960208201612bf9565b6001600160401b03808216602085015280612ca660408501612bf9565b16604085015250506060810135612cbc81612c59565b15156060830152608090810135910152565b5f610120808352612ce28184018b8d612bd1565b90508281036020840152612cf781898b612c14565b90508281036040840152612d0c818789612bd1565b915050836060830152612d226080830184612c66565b9998505050505050505050565b634e487b7160e01b5f52601160045260245ffd5b8082018082111561230a5761230a612d2f565b60e081525f612d6960e083018789612bd1565b8281036020840152612d7c818688612c14565b915050612d8c6040830184612c66565b9695505050505050565b8183525f6020808501808196508560051b81019150845f5b87811015612e155782840389528135601e19883603018112612dce575f80fd5b870185810190356001600160401b03811115612de8575f80fd5b803603821315612df6575f80fd5b612e01868284612bd1565b9a87019a9550505090840190600101612dae565b5091979650505050505050565b5f610120808352612e368184018b8d612d96565b90508281036020840152612e4b81898b612c14565b90508281036040840152612d0c818789612d96565b6001600160a01b0386168152610100602082018190525f90612e858382018789612c14565b915050836040830152612d8c6060830184612c66565b604081525f612eae604083018688612d96565b8281036020840152612ec1818587612c14565b979650505050505050565b604081525f612eae604083018688612bd1565b5f60208284031215612eef575f80fd5b815161238781612c59565b808202811582820484141761230a5761230a612d2f565b5f808335601e19843603018112612f26575f80fd5b8301803591506001600160401b03821115612f3f575f80fd5b6020019150600581901b360382131561243f575f80fd5b5f8085851115612f64575f80fd5b83861115612f70575f80fd5b5050820193919092039150565b634e487b7160e01b5f52603260045260245ffd5b608081525f612fa36080830188612a41565b8281036020840152612fb6818789612bd1565b90508281036040840152612fca8186612a41565b9150508260608301529695505050505050565b5f60018201612fee57612fee612d2f565b5060010190565b8181038181111561230a5761230a612d2f565b5f8261302257634e487b7160e01b5f52601260045260245ffd5b500490565b5f808335601e1984360301811261303c575f80fd5b8301803591506001600160401b03821115613055575f80fd5b60200191503681900382131561243f575f80fd5b61012080825288519082018190525f9061014080840191600581901b8501909101906020808d01855b838110156130c15761013f198886030186526130af858351612a41565b95830195945090820190600101613092565b505085830390860152506130d6818a8c612c14565b91505082810360408401526130ec818789612d96565b9150508360608301526131026080830184612c66565b98975050505050505050565b606081525f613121606083018688612c14565b6020830194909452506040015292915050565b60e081525f612d6960e083018789612d96565b60e081525f61315a60e083018688612c14565b905083602083015261316f6040830184612c66565b95945050505050565b5f60208284031215613188575f80fd5b5051919050565b5f823560fe198336030181126131a3575f80fd5b9190910192915050565b608081525f6131c060808301888a612d96565b82810360208401526131d3818789612c14565b6040840195909552505060600152949350505050565b6001600160a01b038516815260e0602082018190525f9061320d9083018587612c14565b905061316f6040830184612c66565b5f82516131a3818460208701612a1f56fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca264697066735822122050ea87f5b2fd01a83679aafc4c50a5dd44da7af8131d5ec6e70fa89c707e8acd64736f6c63430008140033
Deployed Bytecode
0x6080604052600436106101f1575f3560e01c80635c975abb11610108578063ad3cb1cc1161009d578063d95df9d61161006d578063d95df9d614610553578063dadc424114610572578063e2a73c5014610586578063e98bc7dd146105a5578063f97afa0c146105b8575f80fd5b8063ad3cb1cc146104c6578063b33712c514610503578063be66067914610517578063cc2a9a5b14610534575f80fd5b80639d97366b116100d85780639d97366b14610456578063a1dc1e2a14610469578063a78a5e6514610488578063a7d366b1146104a7575f80fd5b80635c975abb146103d15780635fec6dd0146103f25780637877f95a1461041157806380ca4eb114610442575f80fd5b806332afd02f1161018957806347b94fe81161015957806347b94fe8146103595780634f1ef2861461037857806352d1902d1461038b5780635981a0711461039f5780635aed1142146103b2575f80fd5b806332afd02f146102f35780633877322b146103125780633a60c38614610331578063439766ce14610345575f80fd5b80631b9a91a4116101c45780631b9a91a41461027757806322f18bf514610296578063247b9689146102b55780632f1d5a60146102d4575f80fd5b806305c1efdd146101f557806306e8fb9c1461021657806308ac52561461023557806312b3fc1914610258575b5f80fd5b348015610200575f80fd5b5061021461020f3660046123cb565b6105d7565b005b348015610221575f80fd5b5061021461023036600461249c565b61067b565b348015610240575f80fd5b506003545b6040519081526020015b60405180910390f35b348015610263575f80fd5b50610214610272366004612548565b610731565b348015610282575f80fd5b506102146102913660046125c3565b6107c7565b3480156102a1575f80fd5b506102146102b03660046125ed565b6108e8565b3480156102c0575f80fd5b506102146102cf366004612670565b6109a2565b3480156102df575f80fd5b506102146102ee3660046126c8565b610a37565b3480156102fe575f80fd5b5061021461030d3660046126e3565b610abf565b34801561031d575f80fd5b5061021461032c366004612749565b610b1f565b34801561033c575f80fd5b50600754610245565b348015610350575f80fd5b50610214610b7f565b348015610364575f80fd5b506102146103733660046125c3565b610bb3565b610214610386366004612792565b610cd6565b348015610396575f80fd5b50610245610cf5565b6102146103ad366004612860565b610d10565b3480156103bd575f80fd5b506102146103cc36600461293b565b61145e565b3480156103dc575f80fd5b505f5460ff16604051901515815260200161024f565b3480156103fd575f80fd5b5061021461040c366004612971565b6114c0565b34801561041c575f80fd5b506006546001600160a01b03165b6040516001600160a01b03909116815260200161024f565b34801561044d575f80fd5b50610245611520565b6102146104643660046129ca565b61158f565b348015610474575f80fd5b50610214610483366004612a08565b61181f565b348015610493575f80fd5b506102146104a2366004612a08565b611901565b3480156104b2575f80fd5b506102146104c1366004612a08565b611963565b3480156104d1575f80fd5b506104f6604051806040016040528060058152602001640352e302e360dc1b81525081565b60405161024f9190612a6c565b34801561050e575f80fd5b506102146119c5565b348015610522575f80fd5b506005546001600160a01b031661042a565b34801561053f575f80fd5b5061021461054e366004612a7e565b6119f7565b34801561055e575f80fd5b5061021461056d366004612971565b611c36565b34801561057d575f80fd5b50600454610245565b348015610591575f80fd5b506102146105a0366004612afc565b611c96565b6102146105b336600461293b565b611d28565b3480156105c3575f80fd5b506102146105d23660046126c8565b611e69565b6002546001600160a01b0316331461060a5760405162461bcd60e51b815260040161060190612b4c565b60405180910390fd5b604080516001600160a01b038085168252831660208201527f792440ee82feb5f73482c8a3007e7ada2cc30f25cdfa6fb4f373b08555baea54910160405180910390a1600580546001600160a01b039384166001600160a01b03199182161790915560068054929093169116179055565b6001546001600160a01b031633146106a55760405162461bcd60e51b815260040161060190612b8d565b6005546040516301ba3ee760e21b81526001600160a01b03909116906306e8fb9c906106e3908b908b908b908b908b908b908b908b90600401612cce565b5f604051808303815f87803b1580156106fa575f80fd5b505af115801561070c573d5f803e3d5ffd5b50505050600160075f8282546107229190612d43565b90915550505050505050505050565b6001546001600160a01b0316331461075b5760405162461bcd60e51b815260040161060190612b8d565b6005546040516312b3fc1960e01b81526001600160a01b03909116906312b3fc19906107939088908890889088908890600401612d56565b5f604051808303815f87803b1580156107aa575f80fd5b505af11580156107bc573d5f803e3d5ffd5b505050505050505050565b6002546001600160a01b031633146107f15760405162461bcd60e51b815260040161060190612b4c565b6001600160a01b038216610803573391505b8047101561086d5760405162461bcd60e51b815260206004820152603160248201527f776974686472617720616d6f756e74206d757374206265206c657373207468616044820152706e20616464726573732062616c616e636560781b6064820152608401610601565b816001600160a01b03167f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5826040516108a891815260200190565b60405180910390a26040516001600160a01b0383169082156108fc029083905f818181858888f193505050501580156108e3573d5f803e3d5ffd5b505050565b6001546001600160a01b031633146109125760405162461bcd60e51b815260040161060190612b8d565b6005546040516322f18bf560e01b81526001600160a01b03909116906322f18bf590610950908b908b908b908b908b908b908b908b90600401612e22565b5f604051808303815f87803b158015610967575f80fd5b505af1158015610979573d5f803e3d5ffd5b5050600780548a93508392505f90610992908490612d43565b9091555050505050505050505050565b6001546001600160a01b031633146109cc5760405162461bcd60e51b815260040161060190612b8d565b60055460405163bc26e7e560e01b81526001600160a01b039091169063bc26e7e590610a049030908890889087908990600401612e60565b5f604051808303815f87803b158015610a1b575f80fd5b505af1158015610a2d573d5f803e3d5ffd5b5050505050505050565b6002546001600160a01b03163314610a615760405162461bcd60e51b815260040161060190612b4c565b6040516001600160a01b03821681527fb3b3f5f64ab192e4b5fefde1f51ce9733bbdcf831951543b325aebd49cc27ec49060200160405180910390a1600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b03163314610ae95760405162461bcd60e51b815260040161060190612b8d565b6005546040516332afd02f60e01b81526001600160a01b03909116906332afd02f90610a04908790879087908790600401612e9b565b6001546001600160a01b03163314610b495760405162461bcd60e51b815260040161060190612b8d565b600554604051633877322b60e01b81526001600160a01b0390911690633877322b90610a04908790879087908790600401612ecc565b6002546001600160a01b03163314610ba95760405162461bcd60e51b815260040161060190612b4c565b610bb1611ef0565b565b6002546001600160a01b03163314610bdd5760405162461bcd60e51b815260040161060190612b4c565b6001600160a01b038216610bef573391505b60065460405163095ea7b360e01b8152336004820152602481018390526001600160a01b039091169063095ea7b3906044016020604051808303815f875af1158015610c3d573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610c619190612edf565b5060065460405163a9059cbb60e01b81526001600160a01b038481166004830152602482018490529091169063a9059cbb906044016020604051808303815f875af1158015610cb2573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108e39190612edf565b610cde611f49565b610ce782611fed565b610cf1828261201a565b5050565b5f610cfe6120d6565b505f8051602061322e83398151915290565b610d1861211f565b600754813514610d815760405162461bcd60e51b815260206004820152602e60248201527f42617463684465706f73697420416e642052656769737465723a204e6f6e636560448201526d081b5d5cdd08189948195c5d585b60921b6064820152608401610601565b818015801590610d9357506003548111155b610e2b5760405162461bcd60e51b815260206004820152605c60248201527f42617463684465706f73697420416e642052656769737465723a20596f75207360448201527f686f756c64206465706f736974206174206c65617374206f6e652076616c696460648201527f61746f7220616e64206e6f74207265616368206d6178206c696d697400000000608482015260a401610601565b610e36603082612efa565b8914610e9e5760405162461bcd60e51b815260206004820152603160248201527f42617463684465706f73697420416e642052656769737465723a205075626b656044820152700f240c6deeadce840dcdee840dac2e8c6d607b1b6064820152608401610601565b610ea9606082612efa565b8514610f155760405162461bcd60e51b815260206004820152603560248201527f42617463684465706f73697420416e642052656769737465723a205369676e616044820152740e8eae4cae640c6deeadce840dcdee840dac2e8c6d605b1b6064820152608401610601565b610f2160206001612efa565b8714610fa15760405162461bcd60e51b815260206004820152604360248201527f42617463684465706f73697420416e642052656769737465723a20576974686460448201527f726177616c2043726564656e7469616c7320636f756e7420646f6e2774206d616064820152620e8c6d60eb1b608482015260a401610601565b610fae6040830183612f11565b9050811461101d5760405162461bcd60e51b815260206004820152603660248201527f42617463684465706f73697420416e642052656769737465723a2073686172656044820152750e688c2e8c240d8cadccee8d040dcdee840dac2e8c6d60531b6064820152608401610601565b5f816001600160401b038111156110365761103661277e565b60405190808252806020026020018201604052801561106957816020015b60608152602001906001900390816110545790505b5090505f5b82811015611204575f8c8c611084603085612efa565b906030611092866001612d43565b61109c9190612efa565b926110a993929190612f56565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201829052509394508c92508b91506110ee9050606086612efa565b9060606110fc876001612d43565b6111069190612efa565b9261111393929190612f56565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201829052505493945050506101009091046001600160a01b0316905063228951186801bc16d674ec800000848f8f868e8e8b81811061117e5761117e612f7d565b905060200201356040518763ffffffff1660e01b81526004016111a5959493929190612f91565b5f604051808303818588803b1580156111bc575f80fd5b505af11580156111ce573d5f803e3d5ffd5b5050505050818484815181106111e6576111e6612f7d565b60200260200101819052505050806111fd90612fdd565b905061106e565b505f611219836801bc16d674ec800000612efa565b6112239034612ff5565b90505f60045482670de0b6b3a764000061123d9190612efa565b6112479190613008565b90505f82116112be5760405162461bcd60e51b815260206004820152603d60248201527f42617463684465706f7369742057697468205353563a2073737620746f6b656e60448201527f20616d6f756e74206d75737420626967676572207468616e207a65726f0000006064820152608401610601565b8360010361136f576005546001600160a01b03166306e8fb9c8e8e6112e660208a018a612f11565b6112f360408c018c612f11565b5f81811061130357611303612f7d565b90506020028101906113159190613027565b888d6060016040518963ffffffff1660e01b815260040161133d989796959493929190612cce565b5f604051808303815f87803b158015611354575f80fd5b505af1158015611366573d5f803e3d5ffd5b505050506113f0565b6005546001600160a01b03166322f18bf58461138e6020890189612f11565b61139b60408b018b612f11565b878c6060016040518863ffffffff1660e01b81526004016113c29796959493929190613069565b5f604051808303815f87803b1580156113d9575f80fd5b505af11580156113eb573d5f803e3d5ffd5b505050505b337f8ae1e265d0fd330fbb811ff76ac8ae358c0c454ab3cdd71d795ea8cbbbcf828661141f6020880188612f11565b8585604051611431949392919061310e565b60405180910390a28360075f82825461144a9190612d43565b909155505050505050505050505050505050565b6001546001600160a01b031633146114885760405162461bcd60e51b815260040161060190612b8d565b600554604051632d7688a160e11b81526001600160a01b0390911690635aed1142906107939088908890889088908890600401613134565b6001546001600160a01b031633146114ea5760405162461bcd60e51b815260040161060190612b8d565b6005546040516305fec6dd60e41b81526001600160a01b0390911690635fec6dd090610a04908790879087908790600401613147565b6006546040516370a0823160e01b81523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015611566573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061158a9190613178565b905090565b5f805b828110156117a8575f6004548585848181106115b0576115b0612f7d565b90506020028101906115c2919061318f565b6115d89060200135670de0b6b3a7640000612efa565b6115e29190613008565b6005549091506001600160a01b031663bc26e7e53087878681811061160957611609612f7d565b905060200281019061161b919061318f565b611629906040810190612f11565b858a8a8981811061163c5761163c612f7d565b905060200281019061164e919061318f565b6060016040518663ffffffff1660e01b8152600401611671959493929190612e60565b5f604051808303815f87803b158015611688575f80fd5b505af115801561169a573d5f803e3d5ffd5b505050508484838181106116b0576116b0612f7d565b90506020028101906116c2919061318f565b6116d0906020013584612d43565b9250337f5f6aa5154aebbcb31c00623ce48195b21d4d2508badf2a5e1f3b512b06eadf9686868581811061170657611706612f7d565b9050602002810190611718919061318f565b6117229080612f11565b88888781811061173457611734612f7d565b9050602002810190611746919061318f565b611754906040810190612f11565b8a8a8981811061176657611766612f7d565b9050602002810190611778919061318f565b602001358760405161178f969594939291906131ad565b60405180910390a2506117a181612fdd565b9050611592565b50348111156108e35760405162461bcd60e51b815260206004820152603960248201527f546865206e756d626572206f6620657468206d757374206265206c657373207460448201527f68616e206f7220657175616c20746f206d73672e76616c7565000000000000006064820152608401610601565b6002546001600160a01b031633146118495760405162461bcd60e51b815260040161060190612b4c565b60035481036118b45760405162461bcd60e51b815260206004820152603160248201527f6d61782076616c696461746f7273206d75737420626520646966666572656e746044820152702066726f6d2063757272656e74206f6e6560781b6064820152608401610601565b5f81116118fc5760405162461bcd60e51b815260206004820152601660248201527504d6178206d75737420626967676572207468616e20360541b6044820152606401610601565b600355565b6001546001600160a01b0316331461192b5760405162461bcd60e51b815260040161060190612b8d565b6040518181527f4c91e198a90c69c3a662746627f8e6f4b96b582f6acd7e906abc903d80131e389060200160405180910390a1600455565b6002546001600160a01b0316331461198d5760405162461bcd60e51b815260040161060190612b4c565b6040518181527fc6f316165836b9a9ca658ba2e3bbf32b3acff9aca1956fc77393fb506d26b0d69060200160405180910390a1600755565b6002546001600160a01b031633146119ef5760405162461bcd60e51b815260040161060190612b4c565b610bb1612164565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff1615906001600160401b03165f81158015611a3b5750825b90505f826001600160401b03166001148015611a565750303b155b905081158015611a64575080155b15611a825760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff191660011785558315611aac57845460ff60401b1916600160401b1785555b60646003555f8054610100600160a81b0319166101006001600160a01b038e81169190910291909117909155662386f26fc100006004908155600180546001600160a01b03199081168e8516179091556002805482168d85161790556005805482168c851690811790915560068054909216938b1693841790915560405163095ea7b360e01b8152918201525f19602482015263095ea7b3906044016020604051808303815f875af1158015611b64573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b889190612edf565b506005546040516336f370b360e21b81526001600160a01b0388811660048301529091169063dbcdc2cc906024015f604051808303815f87803b158015611bcd575f80fd5b505af1158015611bdf573d5f803e3d5ffd5b505050508315611c2957845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050505050565b6001546001600160a01b03163314611c605760405162461bcd60e51b815260040161060190612b8d565b600554604051631a1b9a0b60e21b81526001600160a01b039091169063686e682c90610a04908790879087908790600401613147565b6001546001600160a01b03163314611cc05760405162461bcd60e51b815260040161060190612b8d565b600554604051635f8797d960e11b81526001600160a01b039091169063bf0f2fb290611cf69030908790879087906004016131e9565b5f604051808303815f87803b158015611d0d575f80fd5b505af1158015611d1f573d5f803e3d5ffd5b50505050505050565b6004545f90611d3f34670de0b6b3a7640000612efa565b611d499190613008565b90505f8111611db15760405162461bcd60e51b815260206004820152602e60248201527f546865206e756d626572206f662073737620616d6f756e74206d75737420626560448201526d020626967676572207468616e20360941b6064820152608401610601565b336001600160a01b03167f5f6aa5154aebbcb31c00623ce48195b21d4d2508badf2a5e1f3b512b06eadf96878787873487604051611df4969594939291906131ad565b60405180910390a260055460405163bc26e7e560e01b81526001600160a01b039091169063bc26e7e590611e349030908890889087908990600401612e60565b5f604051808303815f87803b158015611e4b575f80fd5b505af1158015611e5d573d5f803e3d5ffd5b50505050505050505050565b6001546001600160a01b03163314611e935760405162461bcd60e51b815260040161060190612b8d565b6005546040516336f370b360e21b81526001600160a01b0383811660048301529091169063dbcdc2cc906024015f604051808303815f87803b158015611ed7575f80fd5b505af1158015611ee9573d5f803e3d5ffd5b5050505050565b611ef861211f565b5f805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611f2c3390565b6040516001600160a01b03909116815260200160405180910390a1565b306001600160a01b037f000000000000000000000000e0bfacfc284db9496d856e287424df0bf2f56835161480611fcf57507f000000000000000000000000e0bfacfc284db9496d856e287424df0bf2f568356001600160a01b0316611fc35f8051602061322e833981519152546001600160a01b031690565b6001600160a01b031614155b15610bb15760405163703e46dd60e11b815260040160405180910390fd5b6002546001600160a01b031633146120175760405162461bcd60e51b815260040161060190612b4c565b50565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015612074575060408051601f3d908101601f1916820190925261207191810190613178565b60015b61209c57604051634c9c8ce360e01b81526001600160a01b0383166004820152602401610601565b5f8051602061322e83398151915281146120cc57604051632a87526960e21b815260048101829052602401610601565b6108e3838361219c565b306001600160a01b037f000000000000000000000000e0bfacfc284db9496d856e287424df0bf2f568351614610bb15760405163703e46dd60e11b815260040160405180910390fd5b5f5460ff1615610bb15760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610601565b61216c6121f1565b5f805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33611f2c565b6121a582612239565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a28051156121e9576108e3828261229c565b610cf1612310565b5f5460ff16610bb15760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610601565b806001600160a01b03163b5f0361226e57604051634c9c8ce360e01b81526001600160a01b0382166004820152602401610601565b5f8051602061322e83398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b60605f80846001600160a01b0316846040516122b8919061321c565b5f60405180830381855af49150503d805f81146122f0576040519150601f19603f3d011682016040523d82523d5f602084013e6122f5565b606091505b509150915061230585838361232f565b925050505b92915050565b3415610bb15760405163b398979f60e01b815260040160405180910390fd5b6060826123445761233f8261238e565b612387565b815115801561235b57506001600160a01b0384163b155b1561238457604051639996b31560e01b81526001600160a01b0385166004820152602401610601565b50805b9392505050565b80511561239e5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b6001600160a01b0381168114612017575f80fd5b5f80604083850312156123dc575f80fd5b82356123e7816123b7565b915060208301356123f7816123b7565b809150509250929050565b5f8083601f840112612412575f80fd5b5081356001600160401b03811115612428575f80fd5b60208301915083602082850101111561243f575f80fd5b9250929050565b5f8083601f840112612456575f80fd5b5081356001600160401b0381111561246c575f80fd5b6020830191508360208260051b850101111561243f575f80fd5b5f60a08284031215612496575f80fd5b50919050565b5f805f805f805f80610120898b0312156124b4575f80fd5b88356001600160401b03808211156124ca575f80fd5b6124d68c838d01612402565b909a50985060208b01359150808211156124ee575f80fd5b6124fa8c838d01612446565b909850965060408b0135915080821115612512575f80fd5b5061251f8b828c01612402565b909550935050606089013591506125398a60808b01612486565b90509295985092959890939650565b5f805f805f60e0868803121561255c575f80fd5b85356001600160401b0380821115612572575f80fd5b61257e89838a01612402565b90975095506020880135915080821115612596575f80fd5b506125a388828901612446565b90945092506125b790508760408801612486565b90509295509295909350565b5f80604083850312156125d4575f80fd5b82356125df816123b7565b946020939093013593505050565b5f805f805f805f80610120898b031215612605575f80fd5b88356001600160401b038082111561261b575f80fd5b6126278c838d01612446565b909a50985060208b013591508082111561263f575f80fd5b61264b8c838d01612446565b909850965060408b0135915080821115612663575f80fd5b5061251f8b828c01612446565b5f805f8060e08587031215612683575f80fd5b84356001600160401b03811115612698575f80fd5b6126a487828801612446565b90955093506126b890508660208701612486565b9396929550929360c00135925050565b5f602082840312156126d8575f80fd5b8135612387816123b7565b5f805f80604085870312156126f6575f80fd5b84356001600160401b038082111561270c575f80fd5b61271888838901612446565b90965094506020870135915080821115612730575f80fd5b5061273d87828801612446565b95989497509550505050565b5f805f806040858703121561275c575f80fd5b84356001600160401b0380821115612772575f80fd5b61271888838901612402565b634e487b7160e01b5f52604160045260245ffd5b5f80604083850312156127a3575f80fd5b82356127ae816123b7565b915060208301356001600160401b03808211156127c9575f80fd5b818501915085601f8301126127dc575f80fd5b8135818111156127ee576127ee61277e565b604051601f8201601f19908116603f011681019083821181831017156128165761281661277e565b8160405282815288602084870101111561282e575f80fd5b826020860160208301375f6020848301015280955050505050509250929050565b5f6101008284031215612496575f80fd5b5f805f805f805f805f60a08a8c031215612878575f80fd5b89356001600160401b038082111561288e575f80fd5b61289a8d838e01612402565b909b50995060208c01359150808211156128b2575f80fd5b6128be8d838e01612402565b909950975060408c01359150808211156128d6575f80fd5b6128e28d838e01612402565b909750955060608c01359150808211156128fa575f80fd5b6129068d838e01612446565b909550935060808c013591508082111561291e575f80fd5b5061292b8c828d0161284f565b9150509295985092959850929598565b5f805f805f60e0868803121561294f575f80fd5b85356001600160401b0380821115612965575f80fd5b61257e89838a01612446565b5f805f8060e08587031215612984575f80fd5b84356001600160401b03811115612999575f80fd5b6129a587828801612446565b909550935050602085013591506129bf8660408701612486565b905092959194509250565b5f80602083850312156129db575f80fd5b82356001600160401b038111156129f0575f80fd5b6129fc85828601612446565b90969095509350505050565b5f60208284031215612a18575f80fd5b5035919050565b5f5b83811015612a39578181015183820152602001612a21565b50505f910152565b5f8151808452612a58816020860160208601612a1f565b601f01601f19169290920160200192915050565b602081525f6123876020830184612a41565b5f805f805f8060c08789031215612a93575f80fd5b8635612a9e816123b7565b95506020870135612aae816123b7565b94506040870135612abe816123b7565b93506060870135612ace816123b7565b92506080870135612ade816123b7565b915060a0870135612aee816123b7565b809150509295509295509295565b5f805f60c08486031215612b0e575f80fd5b83356001600160401b03811115612b23575f80fd5b612b2f86828701612446565b9094509250612b4390508560208601612486565b90509250925092565b60208082526021908201527f4f6e6c79204478706f6f6c207374616b696e672061646d696e20616c6c6f77656040820152601960fa1b606082015260800190565b60208082526024908201527f4f6e6c79204478706f6f6c207374616b696e67206f70657261746f7220616c6c6040820152631bddd95960e21b606082015260800190565b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b80356001600160401b0381168114612c0f575f80fd5b919050565b8183525f60208085019450825f5b85811015612c4e576001600160401b03612c3b83612bf9565b1687529582019590820190600101612c22565b509495945050505050565b8015158114612017575f80fd5b803563ffffffff8116808214612c7a575f80fd5b835250612c8960208201612bf9565b6001600160401b03808216602085015280612ca660408501612bf9565b16604085015250506060810135612cbc81612c59565b15156060830152608090810135910152565b5f610120808352612ce28184018b8d612bd1565b90508281036020840152612cf781898b612c14565b90508281036040840152612d0c818789612bd1565b915050836060830152612d226080830184612c66565b9998505050505050505050565b634e487b7160e01b5f52601160045260245ffd5b8082018082111561230a5761230a612d2f565b60e081525f612d6960e083018789612bd1565b8281036020840152612d7c818688612c14565b915050612d8c6040830184612c66565b9695505050505050565b8183525f6020808501808196508560051b81019150845f5b87811015612e155782840389528135601e19883603018112612dce575f80fd5b870185810190356001600160401b03811115612de8575f80fd5b803603821315612df6575f80fd5b612e01868284612bd1565b9a87019a9550505090840190600101612dae565b5091979650505050505050565b5f610120808352612e368184018b8d612d96565b90508281036020840152612e4b81898b612c14565b90508281036040840152612d0c818789612d96565b6001600160a01b0386168152610100602082018190525f90612e858382018789612c14565b915050836040830152612d8c6060830184612c66565b604081525f612eae604083018688612d96565b8281036020840152612ec1818587612c14565b979650505050505050565b604081525f612eae604083018688612bd1565b5f60208284031215612eef575f80fd5b815161238781612c59565b808202811582820484141761230a5761230a612d2f565b5f808335601e19843603018112612f26575f80fd5b8301803591506001600160401b03821115612f3f575f80fd5b6020019150600581901b360382131561243f575f80fd5b5f8085851115612f64575f80fd5b83861115612f70575f80fd5b5050820193919092039150565b634e487b7160e01b5f52603260045260245ffd5b608081525f612fa36080830188612a41565b8281036020840152612fb6818789612bd1565b90508281036040840152612fca8186612a41565b9150508260608301529695505050505050565b5f60018201612fee57612fee612d2f565b5060010190565b8181038181111561230a5761230a612d2f565b5f8261302257634e487b7160e01b5f52601260045260245ffd5b500490565b5f808335601e1984360301811261303c575f80fd5b8301803591506001600160401b03821115613055575f80fd5b60200191503681900382131561243f575f80fd5b61012080825288519082018190525f9061014080840191600581901b8501909101906020808d01855b838110156130c15761013f198886030186526130af858351612a41565b95830195945090820190600101613092565b505085830390860152506130d6818a8c612c14565b91505082810360408401526130ec818789612d96565b9150508360608301526131026080830184612c66565b98975050505050505050565b606081525f613121606083018688612c14565b6020830194909452506040015292915050565b60e081525f612d6960e083018789612d96565b60e081525f61315a60e083018688612c14565b905083602083015261316f6040830184612c66565b95945050505050565b5f60208284031215613188575f80fd5b5051919050565b5f823560fe198336030181126131a3575f80fd5b9190910192915050565b608081525f6131c060808301888a612d96565b82810360208401526131d3818789612c14565b6040840195909552505060600152949350505050565b6001600160a01b038516815260e0602082018190525f9061320d9083018587612c14565b905061316f6040830184612c66565b5f82516131a3818460208701612a1f56fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca264697066735822122050ea87f5b2fd01a83679aafc4c50a5dd44da7af8131d5ec6e70fa89c707e8acd64736f6c63430008140033
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
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.