Source Code
Overview
ETH Balance
0 ETH
More Info
ContractCreator
Multichain Info
N/A
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
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 Source Code Verified (Exact Match)
Contract Name:
DxpoolBatchDeposit
Compiler Version
v0.8.26+commit.8a97fa7a
Optimization Enabled:
Yes with 2000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// 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, "deposit to 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; } // return official ssv network contract address function ssvNetworkAddress() external view returns (address) { return address(ssvNetwork); } // return official ssv token contract address function ssvTokenAddress() external view returns (address) { return address(ssvToken); } // 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)); } 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 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); // 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": 2000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
[{"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":"getSSVPerEthExchangeRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"ssvNetworkAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ssvTokenAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","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
60a0604052306080523480156012575f80fd5b505f805460ff19169055608051613b3b6100425f395f81816126e701528181612710015261291f0152613b3b5ff3fe60806040526004361061020f575f3560e01c80635981a07111610117578063a7d366b1116100ac578063d95df9d61161007c578063e2a73c5011610062578063e2a73c50146105bc578063e98bc7dd146105db578063f97afa0c146105ee575f80fd5b8063d95df9d614610589578063dadc4241146105a8575f80fd5b8063a7d366b1146104e2578063ad3cb1cc14610501578063b33712c514610556578063cc2a9a5b1461056a575f80fd5b806380ca4eb1116100e757806380ca4eb11461047d5780639d97366b14610491578063a1dc1e2a146104a4578063a78a5e65146104c3575f80fd5b80635981a0711461040b5780635aed11421461041e5780635c975abb1461043d5780635fec6dd01461045e575f80fd5b806332afd02f116101a7578063439766ce116101775780634f1ef2861161015d5780634f1ef286146103c757806352d1902d146103da5780635928aaf3146103ee575f80fd5b8063439766ce1461039457806347b94fe8146103a8575f80fd5b806332afd02f146103115780633877322b146103305780633a60c3861461034f5780633c580bc214610363575f80fd5b80631b9a91a4116101e25780631b9a91a41461029557806322f18bf5146102b4578063247b9689146102d35780632f1d5a60146102f2575f80fd5b806305c1efdd1461021357806306e8fb9c1461023457806308ac52561461025357806312b3fc1914610276575b5f80fd5b34801561021e575f80fd5b5061023261022d366004612cbc565b61060d565b005b34801561023f575f80fd5b5061023261024e366004612d8f565b6106f4565b34801561025e575f80fd5b506003545b6040519081526020015b60405180910390f35b348015610281575f80fd5b50610232610290366004612e48565b6107ff565b3480156102a0575f80fd5b506102326102af366004612ec9565b6108ea565b3480156102bf575f80fd5b506102326102ce366004612ef3565b610a51565b3480156102de575f80fd5b506102326102ed366004612f83565b610b60565b3480156102fd575f80fd5b5061023261030c366004612fdc565b610c4a565b34801561031c575f80fd5b5061023261032b366004612ff7565b610d19565b34801561033b575f80fd5b5061023261034a366004613063565b610dce565b34801561035a575f80fd5b50600754610263565b34801561036e575f80fd5b506005546001600160a01b03165b6040516001600160a01b03909116815260200161026d565b34801561039f575f80fd5b50610232610e83565b3480156103b3575f80fd5b506102326103c2366004612ec9565b610ef1565b6102326103d53660046130ac565b611080565b3480156103e5575f80fd5b5061026361109f565b3480156103f9575f80fd5b506006546001600160a01b031661037c565b610232610419366004613184565b6110cd565b348015610429575f80fd5b5061023261043836600461327a565b611857565b348015610448575f80fd5b505f5460ff16604051901515815260200161026d565b348015610469575f80fd5b506102326104783660046132b0565b61190e565b348015610488575f80fd5b506102636119c3565b61023261049f36600461330a565b611a4b565b3480156104af575f80fd5b506102326104be366004613349565b611cd3565b3480156104ce575f80fd5b506102326104dd366004613349565b611e02565b3480156104ed575f80fd5b506102326104fc366004613349565b611ea0565b34801561050c575f80fd5b506105496040518060400160405280600581526020017f352e302e3000000000000000000000000000000000000000000000000000000081525081565b60405161026d919061338e565b348015610561575f80fd5b50610232611f3c565b348015610575575f80fd5b506102326105843660046133a0565b611fa8565b348015610594575f80fd5b506102326105a33660046132b0565b6122a2565b3480156105b3575f80fd5b50600454610263565b3480156105c7575f80fd5b506102326105d636600461341e565b612357565b6102326105e936600461327a565b61243e565b3480156105f9575f80fd5b50610232610608366004612fdc565b6125a7565b6002546001600160a01b031633146106765760405162461bcd60e51b815260206004820152602160248201527f4f6e6c79204478706f6f6c207374616b696e672061646d696e20616c6c6f77656044820152601960fa1b60648201526084015b60405180910390fd5b604080516001600160a01b038085168252831660208201527f792440ee82feb5f73482c8a3007e7ada2cc30f25cdfa6fb4f373b08555baea54910160405180910390a1600580546001600160a01b0393841673ffffffffffffffffffffffffffffffffffffffff199182161790915560068054929093169116179055565b6001546001600160a01b0316331461075a5760405162461bcd60e51b8152602060048201526024808201527f4f6e6c79204478706f6f6c207374616b696e67206f70657261746f7220616c6c6044820152631bddd95960e21b606482015260840161066d565b6005546040517f06e8fb9c0000000000000000000000000000000000000000000000000000000081526001600160a01b03909116906306e8fb9c906107b1908b908b908b908b908b908b908b908b90600401613575565b5f604051808303815f87803b1580156107c8575f80fd5b505af11580156107da573d5f803e3d5ffd5b50505050600160075f8282546107f091906135e9565b90915550505050505050505050565b6001546001600160a01b031633146108655760405162461bcd60e51b8152602060048201526024808201527f4f6e6c79204478706f6f6c207374616b696e67206f70657261746f7220616c6c6044820152631bddd95960e21b606482015260840161066d565b6005546040517f12b3fc190000000000000000000000000000000000000000000000000000000081526001600160a01b03909116906312b3fc19906108b690889088908890889088906004016135fc565b5f604051808303815f87803b1580156108cd575f80fd5b505af11580156108df573d5f803e3d5ffd5b505050505050505050565b6002546001600160a01b0316331461094e5760405162461bcd60e51b815260206004820152602160248201527f4f6e6c79204478706f6f6c207374616b696e672061646d696e20616c6c6f77656044820152601960fa1b606482015260840161066d565b6001600160a01b038216610960573391505b804710156109d65760405162461bcd60e51b815260206004820152603160248201527f776974686472617720616d6f756e74206d757374206265206c6573732074686160448201527f6e20616464726573732062616c616e6365000000000000000000000000000000606482015260840161066d565b816001600160a01b03167f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d582604051610a1191815260200190565b60405180910390a26040516001600160a01b0383169082156108fc029083905f818181858888f19350505050158015610a4c573d5f803e3d5ffd5b505050565b6001546001600160a01b03163314610ab75760405162461bcd60e51b8152602060048201526024808201527f4f6e6c79204478706f6f6c207374616b696e67206f70657261746f7220616c6c6044820152631bddd95960e21b606482015260840161066d565b6005546040517f22f18bf50000000000000000000000000000000000000000000000000000000081526001600160a01b03909116906322f18bf590610b0e908b908b908b908b908b908b908b908b906004016136d0565b5f604051808303815f87803b158015610b25575f80fd5b505af1158015610b37573d5f803e3d5ffd5b5050600780548a93508392505f90610b509084906135e9565b9091555050505050505050505050565b6001546001600160a01b03163314610bc65760405162461bcd60e51b8152602060048201526024808201527f4f6e6c79204478706f6f6c207374616b696e67206f70657261746f7220616c6c6044820152631bddd95960e21b606482015260840161066d565b6005546040517fbc26e7e50000000000000000000000000000000000000000000000000000000081526001600160a01b039091169063bc26e7e590610c17903090889088908790899060040161370d565b5f604051808303815f87803b158015610c2e575f80fd5b505af1158015610c40573d5f803e3d5ffd5b5050505050505050565b6002546001600160a01b03163314610cae5760405162461bcd60e51b815260206004820152602160248201527f4f6e6c79204478706f6f6c207374616b696e672061646d696e20616c6c6f77656044820152601960fa1b606482015260840161066d565b6040516001600160a01b03821681527fb3b3f5f64ab192e4b5fefde1f51ce9733bbdcf831951543b325aebd49cc27ec49060200160405180910390a16001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6001546001600160a01b03163314610d7f5760405162461bcd60e51b8152602060048201526024808201527f4f6e6c79204478706f6f6c207374616b696e67206f70657261746f7220616c6c6044820152631bddd95960e21b606482015260840161066d565b6005546040517f32afd02f0000000000000000000000000000000000000000000000000000000081526001600160a01b03909116906332afd02f90610c17908790879087908790600401613746565b6001546001600160a01b03163314610e345760405162461bcd60e51b8152602060048201526024808201527f4f6e6c79204478706f6f6c207374616b696e67206f70657261746f7220616c6c6044820152631bddd95960e21b606482015260840161066d565b6005546040517f3877322b0000000000000000000000000000000000000000000000000000000081526001600160a01b0390911690633877322b90610c17908790879087908790600401613777565b6002546001600160a01b03163314610ee75760405162461bcd60e51b815260206004820152602160248201527f4f6e6c79204478706f6f6c207374616b696e672061646d696e20616c6c6f77656044820152601960fa1b606482015260840161066d565b610eef612683565b565b6002546001600160a01b03163314610f555760405162461bcd60e51b815260206004820152602160248201527f4f6e6c79204478706f6f6c207374616b696e672061646d696e20616c6c6f77656044820152601960fa1b606482015260840161066d565b6001600160a01b038216610f67573391505b6006546040517f095ea7b3000000000000000000000000000000000000000000000000000000008152336004820152602481018390526001600160a01b039091169063095ea7b3906044016020604051808303815f875af1158015610fce573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ff2919061378a565b506006546040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b038481166004830152602482018490529091169063a9059cbb906044016020604051808303815f875af115801561105c573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a4c919061378a565b6110886126dc565b611091826127ac565b61109b8282612813565b5050565b5f6110a8612914565b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc90565b6110d5612976565b60075481351461114d5760405162461bcd60e51b815260206004820152602e60248201527f42617463684465706f73697420416e642052656769737465723a204e6f6e636560448201527f206d75737420626520657175616c000000000000000000000000000000000000606482015260840161066d565b81801580159061115f57506003548111155b6111f75760405162461bcd60e51b815260206004820152605c60248201527f42617463684465706f73697420416e642052656769737465723a20596f75207360448201527f686f756c64206465706f736974206174206c65617374206f6e652076616c696460648201527f61746f7220616e64206e6f74207265616368206d6178206c696d697400000000608482015260a40161066d565b6112026030826137a5565b89146112765760405162461bcd60e51b815260206004820152603160248201527f42617463684465706f73697420416e642052656769737465723a205075626b6560448201527f7920636f756e74206e6f74206d61746368000000000000000000000000000000606482015260840161066d565b6112816060826137a5565b85146112f55760405162461bcd60e51b815260206004820152603560248201527f42617463684465706f73697420416e642052656769737465723a205369676e6160448201527f747572657320636f756e74206e6f74206d617463680000000000000000000000606482015260840161066d565b611301602060016137a5565b871461139b5760405162461bcd60e51b815260206004820152604360248201527f42617463684465706f73697420416e642052656769737465723a20576974686460448201527f726177616c2043726564656e7469616c7320636f756e7420646f6e2774206d6160648201527f7463680000000000000000000000000000000000000000000000000000000000608482015260a40161066d565b6113a860408301836137bc565b9050811461141e5760405162461bcd60e51b815260206004820152603660248201527f42617463684465706f73697420416e642052656769737465723a20736861726560448201527f7344617461206c656e677468206e6f74206d6174636800000000000000000000606482015260840161066d565b5f8167ffffffffffffffff81111561143857611438613098565b60405190808252806020026020018201604052801561146b57816020015b60608152602001906001900390816114565790505b5090505f5b828110156115fd575f8c8c6114866030856137a5565b9060306114948660016135e9565b61149e91906137a5565b926114ab93929190613802565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201829052509394508c92508b91506114f090506060866137a5565b9060606114fe8760016135e9565b61150891906137a5565b9261151593929190613802565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201829052505493945050506101009091046001600160a01b0316905063228951186801bc16d674ec800000848f8f868e8e8b81811061158057611580613829565b905060200201356040518763ffffffff1660e01b81526004016115a795949392919061383d565b5f604051808303818588803b1580156115be575f80fd5b505af11580156115d0573d5f803e3d5ffd5b5050505050818484815181106115e8576115e8613829565b60209081029190910101525050600101611470565b505f611612836801bc16d674ec8000006137a5565b61161c9034613889565b90505f60045482670de0b6b3a764000061163691906137a5565b611640919061389c565b90505f82116116b75760405162461bcd60e51b815260206004820152603d60248201527f42617463684465706f7369742057697468205353563a2073737620746f6b656e60448201527f20616d6f756e74206d75737420626967676572207468616e207a65726f000000606482015260840161066d565b83600103611768576005546001600160a01b03166306e8fb9c8e8e6116df60208a018a6137bc565b6116ec60408c018c6137bc565b5f8181106116fc576116fc613829565b905060200281019061170e91906138bb565b888d6060016040518963ffffffff1660e01b8152600401611736989796959493929190613575565b5f604051808303815f87803b15801561174d575f80fd5b505af115801561175f573d5f803e3d5ffd5b505050506117e9565b6005546001600160a01b03166322f18bf58461178760208901896137bc565b61179460408b018b6137bc565b878c6060016040518863ffffffff1660e01b81526004016117bb97969594939291906138fe565b5f604051808303815f87803b1580156117d2575f80fd5b505af11580156117e4573d5f803e3d5ffd5b505050505b337f8ae1e265d0fd330fbb811ff76ac8ae358c0c454ab3cdd71d795ea8cbbbcf828661181860208801886137bc565b858560405161182a94939291906139c5565b60405180910390a28360075f82825461184391906135e9565b909155505050505050505050505050505050565b6001546001600160a01b031633146118bd5760405162461bcd60e51b8152602060048201526024808201527f4f6e6c79204478706f6f6c207374616b696e67206f70657261746f7220616c6c6044820152631bddd95960e21b606482015260840161066d565b6005546040517f5aed11420000000000000000000000000000000000000000000000000000000081526001600160a01b0390911690635aed1142906108b690889088908890889088906004016139eb565b6001546001600160a01b031633146119745760405162461bcd60e51b8152602060048201526024808201527f4f6e6c79204478706f6f6c207374616b696e67206f70657261746f7220616c6c6044820152631bddd95960e21b606482015260840161066d565b6005546040517f5fec6dd00000000000000000000000000000000000000000000000000000000081526001600160a01b0390911690635fec6dd090610c179087908790879087906004016139fe565b6006546040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015611a22573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a469190613a2f565b905090565b5f805b82811015611c5c575f600454858584818110611a6c57611a6c613829565b9050602002810190611a7e9190613a46565b611a949060200135670de0b6b3a76400006137a5565b611a9e919061389c565b6005549091506001600160a01b031663bc26e7e530878786818110611ac557611ac5613829565b9050602002810190611ad79190613a46565b611ae59060408101906137bc565b858a8a89818110611af857611af8613829565b9050602002810190611b0a9190613a46565b6060016040518663ffffffff1660e01b8152600401611b2d95949392919061370d565b5f604051808303815f87803b158015611b44575f80fd5b505af1158015611b56573d5f803e3d5ffd5b50505050848483818110611b6c57611b6c613829565b9050602002810190611b7e9190613a46565b611b8c9060200135846135e9565b9250337f5f6aa5154aebbcb31c00623ce48195b21d4d2508badf2a5e1f3b512b06eadf96868685818110611bc257611bc2613829565b9050602002810190611bd49190613a46565b611bde90806137bc565b888887818110611bf057611bf0613829565b9050602002810190611c029190613a46565b611c109060408101906137bc565b8a8a89818110611c2257611c22613829565b9050602002810190611c349190613a46565b6020013587604051611c4b96959493929190613a82565b60405180910390a250600101611a4e565b5034811115610a4c5760405162461bcd60e51b815260206004820152603960248201527f546865206e756d626572206f6620657468206d757374206265206c657373207460448201527f68616e206f7220657175616c20746f206d73672e76616c756500000000000000606482015260840161066d565b6002546001600160a01b03163314611d375760405162461bcd60e51b815260206004820152602160248201527f4f6e6c79204478706f6f6c207374616b696e672061646d696e20616c6c6f77656044820152601960fa1b606482015260840161066d565b6003548103611dae5760405162461bcd60e51b815260206004820152603160248201527f6d61782076616c696461746f7273206d75737420626520646966666572656e7460448201527f2066726f6d2063757272656e74206f6e65000000000000000000000000000000606482015260840161066d565b5f8111611dfd5760405162461bcd60e51b815260206004820152601660248201527f4d6178206d75737420626967676572207468616e203000000000000000000000604482015260640161066d565b600355565b6001546001600160a01b03163314611e685760405162461bcd60e51b8152602060048201526024808201527f4f6e6c79204478706f6f6c207374616b696e67206f70657261746f7220616c6c6044820152631bddd95960e21b606482015260840161066d565b6040518181527f4c91e198a90c69c3a662746627f8e6f4b96b582f6acd7e906abc903d80131e389060200160405180910390a1600455565b6002546001600160a01b03163314611f045760405162461bcd60e51b815260206004820152602160248201527f4f6e6c79204478706f6f6c207374616b696e672061646d696e20616c6c6f77656044820152601960fa1b606482015260840161066d565b6040518181527fc6f316165836b9a9ca658ba2e3bbf32b3acff9aca1956fc77393fb506d26b0d69060200160405180910390a1600755565b6002546001600160a01b03163314611fa05760405162461bcd60e51b815260206004820152602160248201527f4f6e6c79204478706f6f6c207374616b696e672061646d696e20616c6c6f77656044820152601960fa1b606482015260840161066d565b610eef6129c8565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff16159067ffffffffffffffff165f81158015611ff25750825b90505f8267ffffffffffffffff16600114801561200e5750303b155b90508115801561201c575080155b15612053576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84547fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000166001178555831561209e57845468ff00000000000000001916680100000000000000001785555b60646003555f80547fffffffffffffffffffffff0000000000000000000000000000000000000000ff166101006001600160a01b038e81169190910291909117909155662386f26fc1000060049081556001805473ffffffffffffffffffffffffffffffffffffffff199081168e8516179091556002805482168d85161790556005805482168c851690811790915560068054909216938b169384179091556040517f095ea7b3000000000000000000000000000000000000000000000000000000008152918201527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602482015263095ea7b3906044016020604051808303815f875af11580156121b2573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906121d6919061378a565b506005546040517fdbcdc2cc0000000000000000000000000000000000000000000000000000000081526001600160a01b0388811660048301529091169063dbcdc2cc906024015f604051808303815f87803b158015612234575f80fd5b505af1158015612246573d5f803e3d5ffd5b50505050831561229557845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050505050565b6001546001600160a01b031633146123085760405162461bcd60e51b8152602060048201526024808201527f4f6e6c79204478706f6f6c207374616b696e67206f70657261746f7220616c6c6044820152631bddd95960e21b606482015260840161066d565b6005546040517f686e682c0000000000000000000000000000000000000000000000000000000081526001600160a01b039091169063686e682c90610c179087908790879087906004016139fe565b6001546001600160a01b031633146123bd5760405162461bcd60e51b8152602060048201526024808201527f4f6e6c79204478706f6f6c207374616b696e67206f70657261746f7220616c6c6044820152631bddd95960e21b606482015260840161066d565b6005546040517fbf0f2fb20000000000000000000000000000000000000000000000000000000081526001600160a01b039091169063bf0f2fb29061240c903090879087908790600401613abe565b5f604051808303815f87803b158015612423575f80fd5b505af1158015612435573d5f803e3d5ffd5b50505050505050565b6004545f9061245534670de0b6b3a76400006137a5565b61245f919061389c565b90505f81116124d65760405162461bcd60e51b815260206004820152602b60248201527f6465706f73697420746f2073737620616d6f756e74206d75737420626520626960448201527f67676572207468616e2030000000000000000000000000000000000000000000606482015260840161066d565b336001600160a01b03167f5f6aa5154aebbcb31c00623ce48195b21d4d2508badf2a5e1f3b512b06eadf9687878787348760405161251996959493929190613a82565b60405180910390a26005546040517fbc26e7e50000000000000000000000000000000000000000000000000000000081526001600160a01b039091169063bc26e7e590612572903090889088908790899060040161370d565b5f604051808303815f87803b158015612589575f80fd5b505af115801561259b573d5f803e3d5ffd5b50505050505050505050565b6001546001600160a01b0316331461260d5760405162461bcd60e51b8152602060048201526024808201527f4f6e6c79204478706f6f6c207374616b696e67206f70657261746f7220616c6c6044820152631bddd95960e21b606482015260840161066d565b6005546040517fdbcdc2cc0000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301529091169063dbcdc2cc906024015f604051808303815f87803b15801561266a575f80fd5b505af115801561267c573d5f803e3d5ffd5b5050505050565b61268b612976565b5f805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586126bf3390565b6040516001600160a01b03909116815260200160405180910390a1565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061277557507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166127697f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b031614155b15610eef576040517fe07c8dba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002546001600160a01b031633146128105760405162461bcd60e51b815260206004820152602160248201527f4f6e6c79204478706f6f6c207374616b696e672061646d696e20616c6c6f77656044820152601960fa1b606482015260840161066d565b50565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561286d575060408051601f3d908101601f1916820190925261286a91810190613a2f565b60015b6128ae576040517f4c9c8ce30000000000000000000000000000000000000000000000000000000081526001600160a01b038316600482015260240161066d565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc811461290a576040517faa1d49a40000000000000000000000000000000000000000000000000000000081526004810182905260240161066d565b610a4c8383612a00565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610eef576040517fe07c8dba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5460ff1615610eef5760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015260640161066d565b6129d0612a55565b5f805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa336126bf565b612a0982612aa6565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a2805115612a4d57610a4c8282612b42565b61109b612bb6565b5f5460ff16610eef5760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015260640161066d565b806001600160a01b03163b5f03612af4576040517f4c9c8ce30000000000000000000000000000000000000000000000000000000081526001600160a01b038216600482015260240161066d565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b60605f80846001600160a01b031684604051612b5e9190613aef565b5f60405180830381855af49150503d805f8114612b96576040519150601f19603f3d011682016040523d82523d5f602084013e612b9b565b606091505b5091509150612bab858383612bee565b925050505b92915050565b3415610eef576040517fb398979f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606082612c0357612bfe82612c66565b612c5f565b8151158015612c1a57506001600160a01b0384163b155b15612c5c576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b038516600482015260240161066d565b50805b9392505050565b805115612c765780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0381168114612810575f80fd5b5f8060408385031215612ccd575f80fd5b8235612cd881612ca8565b91506020830135612ce881612ca8565b809150509250929050565b5f8083601f840112612d03575f80fd5b50813567ffffffffffffffff811115612d1a575f80fd5b602083019150836020828501011115612d31575f80fd5b9250929050565b5f8083601f840112612d48575f80fd5b50813567ffffffffffffffff811115612d5f575f80fd5b6020830191508360208260051b8501011115612d31575f80fd5b5f60a08284031215612d89575f80fd5b50919050565b5f805f805f805f80610120898b031215612da7575f80fd5b883567ffffffffffffffff811115612dbd575f80fd5b612dc98b828c01612cf3565b909950975050602089013567ffffffffffffffff811115612de8575f80fd5b612df48b828c01612d38565b909750955050604089013567ffffffffffffffff811115612e13575f80fd5b612e1f8b828c01612cf3565b90955093505060608901359150612e398a60808b01612d79565b90509295985092959890939650565b5f805f805f60e08688031215612e5c575f80fd5b853567ffffffffffffffff811115612e72575f80fd5b612e7e88828901612cf3565b909650945050602086013567ffffffffffffffff811115612e9d575f80fd5b612ea988828901612d38565b9094509250612ebd90508760408801612d79565b90509295509295909350565b5f8060408385031215612eda575f80fd5b8235612ee581612ca8565b946020939093013593505050565b5f805f805f805f80610120898b031215612f0b575f80fd5b883567ffffffffffffffff811115612f21575f80fd5b612f2d8b828c01612d38565b909950975050602089013567ffffffffffffffff811115612f4c575f80fd5b612f588b828c01612d38565b909750955050604089013567ffffffffffffffff811115612f77575f80fd5b612e1f8b828c01612d38565b5f805f8060e08587031215612f96575f80fd5b843567ffffffffffffffff811115612fac575f80fd5b612fb887828801612d38565b9095509350612fcc90508660208701612d79565b9396929550929360c00135925050565b5f60208284031215612fec575f80fd5b8135612c5f81612ca8565b5f805f806040858703121561300a575f80fd5b843567ffffffffffffffff811115613020575f80fd5b61302c87828801612d38565b909550935050602085013567ffffffffffffffff81111561304b575f80fd5b61305787828801612d38565b95989497509550505050565b5f805f8060408587031215613076575f80fd5b843567ffffffffffffffff81111561308c575f80fd5b61302c87828801612cf3565b634e487b7160e01b5f52604160045260245ffd5b5f80604083850312156130bd575f80fd5b82356130c881612ca8565b9150602083013567ffffffffffffffff8111156130e3575f80fd5b8301601f810185136130f3575f80fd5b803567ffffffffffffffff81111561310d5761310d613098565b604051601f19603f601f19601f8501160116810181811067ffffffffffffffff8211171561313d5761313d613098565b604052818152828201602001871015613154575f80fd5b816020840160208301375f602083830101528093505050509250929050565b5f6101008284031215612d89575f80fd5b5f805f805f805f805f60a08a8c03121561319c575f80fd5b893567ffffffffffffffff8111156131b2575f80fd5b6131be8c828d01612cf3565b909a5098505060208a013567ffffffffffffffff8111156131dd575f80fd5b6131e98c828d01612cf3565b90985096505060408a013567ffffffffffffffff811115613208575f80fd5b6132148c828d01612cf3565b90965094505060608a013567ffffffffffffffff811115613233575f80fd5b61323f8c828d01612d38565b90945092505060808a013567ffffffffffffffff81111561325e575f80fd5b61326a8c828d01613173565b9150509295985092959850929598565b5f805f805f60e0868803121561328e575f80fd5b853567ffffffffffffffff8111156132a4575f80fd5b612e7e88828901612d38565b5f805f8060e085870312156132c3575f80fd5b843567ffffffffffffffff8111156132d9575f80fd5b6132e587828801612d38565b909550935050602085013591506132ff8660408701612d79565b905092959194509250565b5f806020838503121561331b575f80fd5b823567ffffffffffffffff811115613331575f80fd5b61333d85828601612d38565b90969095509350505050565b5f60208284031215613359575f80fd5b5035919050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f612c5f6020830184613360565b5f805f805f8060c087890312156133b5575f80fd5b86356133c081612ca8565b955060208701356133d081612ca8565b945060408701356133e081612ca8565b935060608701356133f081612ca8565b9250608087013561340081612ca8565b915060a087013561341081612ca8565b809150509295509295509295565b5f805f60c08486031215613430575f80fd5b833567ffffffffffffffff811115613446575f80fd5b61345286828701612d38565b909450925061346690508560208601612d79565b90509250925092565b81835281816020850137505f602082840101525f6020601f19601f840116840101905092915050565b803567ffffffffffffffff811681146134af575f80fd5b919050565b8183526020830192505f815f5b848110156134f15767ffffffffffffffff6134db83613498565b16865260209586019591909101906001016134c1565b5093949350505050565b8015158114612810575f80fd5b803563ffffffff811680821461351c575f80fd5b83525067ffffffffffffffff61353460208301613498565b16602083015267ffffffffffffffff61354f60408301613498565b1660408301526060810135613563816134fb565b15156060830152608090810135910152565b61012081525f61358a61012083018a8c61346f565b828103602084015261359d81898b6134b4565b905082810360408401526135b281878961346f565b9150508360608301526135c86080830184613508565b9998505050505050505050565b634e487b7160e01b5f52601160045260245ffd5b80820180821115612bb057612bb06135d5565b60e081525f61360f60e08301878961346f565b82810360208401526136228186886134b4565b9150506136326040830184613508565b9695505050505050565b5f8383855260208501945060208460051b820101835f5b868110156136c457601f198484030188528135601e19873603018112613677575f80fd5b860160208101903567ffffffffffffffff811115613693575f80fd5b8036038213156136a1575f80fd5b6136ac85828461346f565b60209a8b019a90955093909301925050600101613653565b50909695505050505050565b61012081525f6136e561012083018a8c61363c565b82810360208401526136f881898b6134b4565b905082810360408401526135b281878961363c565b6001600160a01b038616815261010060208201525f613731610100830186886134b4565b90508360408301526136326060830184613508565b604081525f61375960408301868861363c565b828103602084015261376c8185876134b4565b979650505050505050565b604081525f61375960408301868861346f565b5f6020828403121561379a575f80fd5b8151612c5f816134fb565b8082028115828204841417612bb057612bb06135d5565b5f808335601e198436030181126137d1575f80fd5b83018035915067ffffffffffffffff8211156137eb575f80fd5b6020019150600581901b3603821315612d31575f80fd5b5f8085851115613810575f80fd5b8386111561381c575f80fd5b5050820193919092039150565b634e487b7160e01b5f52603260045260245ffd5b608081525f61384f6080830188613360565b828103602084015261386281878961346f565b905082810360408401526138768186613360565b9150508260608301529695505050505050565b81810381811115612bb057612bb06135d5565b5f826138b657634e487b7160e01b5f52601260045260245ffd5b500490565b5f808335601e198436030181126138d0575f80fd5b83018035915067ffffffffffffffff8211156138ea575f80fd5b602001915036819003821315612d31575f80fd5b5f61012082016101208352808a51808352610140850191506101408160051b860101925060208c015f5b82811015613977577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec0878603018452613962858351613360565b94506020938401939190910190600101613928565b50505050828103602084015261398e81898b6134b4565b905082810360408401526139a381878961363c565b9150508360608301526139b96080830184613508565b98975050505050505050565b606081525f6139d86060830186886134b4565b6020830194909452506040015292915050565b60e081525f61360f60e08301878961363c565b60e081525f613a1160e0830186886134b4565b9050836020830152613a266040830184613508565b95945050505050565b5f60208284031215613a3f575f80fd5b5051919050565b5f82357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01833603018112613a78575f80fd5b9190910192915050565b608081525f613a9560808301888a61363c565b8281036020840152613aa88187896134b4565b6040840195909552505060600152949350505050565b6001600160a01b038516815260e060208201525f613ae060e0830185876134b4565b9050613a266040830184613508565b5f82518060208501845e5f92019182525091905056fea264697066735822122067579d8e2989673ac0c9e3459d87ed95fa99da11e3dc08bb9565e9ba5499eb5e64736f6c634300081a0033
Deployed Bytecode
0x60806040526004361061020f575f3560e01c80635981a07111610117578063a7d366b1116100ac578063d95df9d61161007c578063e2a73c5011610062578063e2a73c50146105bc578063e98bc7dd146105db578063f97afa0c146105ee575f80fd5b8063d95df9d614610589578063dadc4241146105a8575f80fd5b8063a7d366b1146104e2578063ad3cb1cc14610501578063b33712c514610556578063cc2a9a5b1461056a575f80fd5b806380ca4eb1116100e757806380ca4eb11461047d5780639d97366b14610491578063a1dc1e2a146104a4578063a78a5e65146104c3575f80fd5b80635981a0711461040b5780635aed11421461041e5780635c975abb1461043d5780635fec6dd01461045e575f80fd5b806332afd02f116101a7578063439766ce116101775780634f1ef2861161015d5780634f1ef286146103c757806352d1902d146103da5780635928aaf3146103ee575f80fd5b8063439766ce1461039457806347b94fe8146103a8575f80fd5b806332afd02f146103115780633877322b146103305780633a60c3861461034f5780633c580bc214610363575f80fd5b80631b9a91a4116101e25780631b9a91a41461029557806322f18bf5146102b4578063247b9689146102d35780632f1d5a60146102f2575f80fd5b806305c1efdd1461021357806306e8fb9c1461023457806308ac52561461025357806312b3fc1914610276575b5f80fd5b34801561021e575f80fd5b5061023261022d366004612cbc565b61060d565b005b34801561023f575f80fd5b5061023261024e366004612d8f565b6106f4565b34801561025e575f80fd5b506003545b6040519081526020015b60405180910390f35b348015610281575f80fd5b50610232610290366004612e48565b6107ff565b3480156102a0575f80fd5b506102326102af366004612ec9565b6108ea565b3480156102bf575f80fd5b506102326102ce366004612ef3565b610a51565b3480156102de575f80fd5b506102326102ed366004612f83565b610b60565b3480156102fd575f80fd5b5061023261030c366004612fdc565b610c4a565b34801561031c575f80fd5b5061023261032b366004612ff7565b610d19565b34801561033b575f80fd5b5061023261034a366004613063565b610dce565b34801561035a575f80fd5b50600754610263565b34801561036e575f80fd5b506005546001600160a01b03165b6040516001600160a01b03909116815260200161026d565b34801561039f575f80fd5b50610232610e83565b3480156103b3575f80fd5b506102326103c2366004612ec9565b610ef1565b6102326103d53660046130ac565b611080565b3480156103e5575f80fd5b5061026361109f565b3480156103f9575f80fd5b506006546001600160a01b031661037c565b610232610419366004613184565b6110cd565b348015610429575f80fd5b5061023261043836600461327a565b611857565b348015610448575f80fd5b505f5460ff16604051901515815260200161026d565b348015610469575f80fd5b506102326104783660046132b0565b61190e565b348015610488575f80fd5b506102636119c3565b61023261049f36600461330a565b611a4b565b3480156104af575f80fd5b506102326104be366004613349565b611cd3565b3480156104ce575f80fd5b506102326104dd366004613349565b611e02565b3480156104ed575f80fd5b506102326104fc366004613349565b611ea0565b34801561050c575f80fd5b506105496040518060400160405280600581526020017f352e302e3000000000000000000000000000000000000000000000000000000081525081565b60405161026d919061338e565b348015610561575f80fd5b50610232611f3c565b348015610575575f80fd5b506102326105843660046133a0565b611fa8565b348015610594575f80fd5b506102326105a33660046132b0565b6122a2565b3480156105b3575f80fd5b50600454610263565b3480156105c7575f80fd5b506102326105d636600461341e565b612357565b6102326105e936600461327a565b61243e565b3480156105f9575f80fd5b50610232610608366004612fdc565b6125a7565b6002546001600160a01b031633146106765760405162461bcd60e51b815260206004820152602160248201527f4f6e6c79204478706f6f6c207374616b696e672061646d696e20616c6c6f77656044820152601960fa1b60648201526084015b60405180910390fd5b604080516001600160a01b038085168252831660208201527f792440ee82feb5f73482c8a3007e7ada2cc30f25cdfa6fb4f373b08555baea54910160405180910390a1600580546001600160a01b0393841673ffffffffffffffffffffffffffffffffffffffff199182161790915560068054929093169116179055565b6001546001600160a01b0316331461075a5760405162461bcd60e51b8152602060048201526024808201527f4f6e6c79204478706f6f6c207374616b696e67206f70657261746f7220616c6c6044820152631bddd95960e21b606482015260840161066d565b6005546040517f06e8fb9c0000000000000000000000000000000000000000000000000000000081526001600160a01b03909116906306e8fb9c906107b1908b908b908b908b908b908b908b908b90600401613575565b5f604051808303815f87803b1580156107c8575f80fd5b505af11580156107da573d5f803e3d5ffd5b50505050600160075f8282546107f091906135e9565b90915550505050505050505050565b6001546001600160a01b031633146108655760405162461bcd60e51b8152602060048201526024808201527f4f6e6c79204478706f6f6c207374616b696e67206f70657261746f7220616c6c6044820152631bddd95960e21b606482015260840161066d565b6005546040517f12b3fc190000000000000000000000000000000000000000000000000000000081526001600160a01b03909116906312b3fc19906108b690889088908890889088906004016135fc565b5f604051808303815f87803b1580156108cd575f80fd5b505af11580156108df573d5f803e3d5ffd5b505050505050505050565b6002546001600160a01b0316331461094e5760405162461bcd60e51b815260206004820152602160248201527f4f6e6c79204478706f6f6c207374616b696e672061646d696e20616c6c6f77656044820152601960fa1b606482015260840161066d565b6001600160a01b038216610960573391505b804710156109d65760405162461bcd60e51b815260206004820152603160248201527f776974686472617720616d6f756e74206d757374206265206c6573732074686160448201527f6e20616464726573732062616c616e6365000000000000000000000000000000606482015260840161066d565b816001600160a01b03167f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d582604051610a1191815260200190565b60405180910390a26040516001600160a01b0383169082156108fc029083905f818181858888f19350505050158015610a4c573d5f803e3d5ffd5b505050565b6001546001600160a01b03163314610ab75760405162461bcd60e51b8152602060048201526024808201527f4f6e6c79204478706f6f6c207374616b696e67206f70657261746f7220616c6c6044820152631bddd95960e21b606482015260840161066d565b6005546040517f22f18bf50000000000000000000000000000000000000000000000000000000081526001600160a01b03909116906322f18bf590610b0e908b908b908b908b908b908b908b908b906004016136d0565b5f604051808303815f87803b158015610b25575f80fd5b505af1158015610b37573d5f803e3d5ffd5b5050600780548a93508392505f90610b509084906135e9565b9091555050505050505050505050565b6001546001600160a01b03163314610bc65760405162461bcd60e51b8152602060048201526024808201527f4f6e6c79204478706f6f6c207374616b696e67206f70657261746f7220616c6c6044820152631bddd95960e21b606482015260840161066d565b6005546040517fbc26e7e50000000000000000000000000000000000000000000000000000000081526001600160a01b039091169063bc26e7e590610c17903090889088908790899060040161370d565b5f604051808303815f87803b158015610c2e575f80fd5b505af1158015610c40573d5f803e3d5ffd5b5050505050505050565b6002546001600160a01b03163314610cae5760405162461bcd60e51b815260206004820152602160248201527f4f6e6c79204478706f6f6c207374616b696e672061646d696e20616c6c6f77656044820152601960fa1b606482015260840161066d565b6040516001600160a01b03821681527fb3b3f5f64ab192e4b5fefde1f51ce9733bbdcf831951543b325aebd49cc27ec49060200160405180910390a16001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6001546001600160a01b03163314610d7f5760405162461bcd60e51b8152602060048201526024808201527f4f6e6c79204478706f6f6c207374616b696e67206f70657261746f7220616c6c6044820152631bddd95960e21b606482015260840161066d565b6005546040517f32afd02f0000000000000000000000000000000000000000000000000000000081526001600160a01b03909116906332afd02f90610c17908790879087908790600401613746565b6001546001600160a01b03163314610e345760405162461bcd60e51b8152602060048201526024808201527f4f6e6c79204478706f6f6c207374616b696e67206f70657261746f7220616c6c6044820152631bddd95960e21b606482015260840161066d565b6005546040517f3877322b0000000000000000000000000000000000000000000000000000000081526001600160a01b0390911690633877322b90610c17908790879087908790600401613777565b6002546001600160a01b03163314610ee75760405162461bcd60e51b815260206004820152602160248201527f4f6e6c79204478706f6f6c207374616b696e672061646d696e20616c6c6f77656044820152601960fa1b606482015260840161066d565b610eef612683565b565b6002546001600160a01b03163314610f555760405162461bcd60e51b815260206004820152602160248201527f4f6e6c79204478706f6f6c207374616b696e672061646d696e20616c6c6f77656044820152601960fa1b606482015260840161066d565b6001600160a01b038216610f67573391505b6006546040517f095ea7b3000000000000000000000000000000000000000000000000000000008152336004820152602481018390526001600160a01b039091169063095ea7b3906044016020604051808303815f875af1158015610fce573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ff2919061378a565b506006546040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b038481166004830152602482018490529091169063a9059cbb906044016020604051808303815f875af115801561105c573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a4c919061378a565b6110886126dc565b611091826127ac565b61109b8282612813565b5050565b5f6110a8612914565b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc90565b6110d5612976565b60075481351461114d5760405162461bcd60e51b815260206004820152602e60248201527f42617463684465706f73697420416e642052656769737465723a204e6f6e636560448201527f206d75737420626520657175616c000000000000000000000000000000000000606482015260840161066d565b81801580159061115f57506003548111155b6111f75760405162461bcd60e51b815260206004820152605c60248201527f42617463684465706f73697420416e642052656769737465723a20596f75207360448201527f686f756c64206465706f736974206174206c65617374206f6e652076616c696460648201527f61746f7220616e64206e6f74207265616368206d6178206c696d697400000000608482015260a40161066d565b6112026030826137a5565b89146112765760405162461bcd60e51b815260206004820152603160248201527f42617463684465706f73697420416e642052656769737465723a205075626b6560448201527f7920636f756e74206e6f74206d61746368000000000000000000000000000000606482015260840161066d565b6112816060826137a5565b85146112f55760405162461bcd60e51b815260206004820152603560248201527f42617463684465706f73697420416e642052656769737465723a205369676e6160448201527f747572657320636f756e74206e6f74206d617463680000000000000000000000606482015260840161066d565b611301602060016137a5565b871461139b5760405162461bcd60e51b815260206004820152604360248201527f42617463684465706f73697420416e642052656769737465723a20576974686460448201527f726177616c2043726564656e7469616c7320636f756e7420646f6e2774206d6160648201527f7463680000000000000000000000000000000000000000000000000000000000608482015260a40161066d565b6113a860408301836137bc565b9050811461141e5760405162461bcd60e51b815260206004820152603660248201527f42617463684465706f73697420416e642052656769737465723a20736861726560448201527f7344617461206c656e677468206e6f74206d6174636800000000000000000000606482015260840161066d565b5f8167ffffffffffffffff81111561143857611438613098565b60405190808252806020026020018201604052801561146b57816020015b60608152602001906001900390816114565790505b5090505f5b828110156115fd575f8c8c6114866030856137a5565b9060306114948660016135e9565b61149e91906137a5565b926114ab93929190613802565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201829052509394508c92508b91506114f090506060866137a5565b9060606114fe8760016135e9565b61150891906137a5565b9261151593929190613802565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201829052505493945050506101009091046001600160a01b0316905063228951186801bc16d674ec800000848f8f868e8e8b81811061158057611580613829565b905060200201356040518763ffffffff1660e01b81526004016115a795949392919061383d565b5f604051808303818588803b1580156115be575f80fd5b505af11580156115d0573d5f803e3d5ffd5b5050505050818484815181106115e8576115e8613829565b60209081029190910101525050600101611470565b505f611612836801bc16d674ec8000006137a5565b61161c9034613889565b90505f60045482670de0b6b3a764000061163691906137a5565b611640919061389c565b90505f82116116b75760405162461bcd60e51b815260206004820152603d60248201527f42617463684465706f7369742057697468205353563a2073737620746f6b656e60448201527f20616d6f756e74206d75737420626967676572207468616e207a65726f000000606482015260840161066d565b83600103611768576005546001600160a01b03166306e8fb9c8e8e6116df60208a018a6137bc565b6116ec60408c018c6137bc565b5f8181106116fc576116fc613829565b905060200281019061170e91906138bb565b888d6060016040518963ffffffff1660e01b8152600401611736989796959493929190613575565b5f604051808303815f87803b15801561174d575f80fd5b505af115801561175f573d5f803e3d5ffd5b505050506117e9565b6005546001600160a01b03166322f18bf58461178760208901896137bc565b61179460408b018b6137bc565b878c6060016040518863ffffffff1660e01b81526004016117bb97969594939291906138fe565b5f604051808303815f87803b1580156117d2575f80fd5b505af11580156117e4573d5f803e3d5ffd5b505050505b337f8ae1e265d0fd330fbb811ff76ac8ae358c0c454ab3cdd71d795ea8cbbbcf828661181860208801886137bc565b858560405161182a94939291906139c5565b60405180910390a28360075f82825461184391906135e9565b909155505050505050505050505050505050565b6001546001600160a01b031633146118bd5760405162461bcd60e51b8152602060048201526024808201527f4f6e6c79204478706f6f6c207374616b696e67206f70657261746f7220616c6c6044820152631bddd95960e21b606482015260840161066d565b6005546040517f5aed11420000000000000000000000000000000000000000000000000000000081526001600160a01b0390911690635aed1142906108b690889088908890889088906004016139eb565b6001546001600160a01b031633146119745760405162461bcd60e51b8152602060048201526024808201527f4f6e6c79204478706f6f6c207374616b696e67206f70657261746f7220616c6c6044820152631bddd95960e21b606482015260840161066d565b6005546040517f5fec6dd00000000000000000000000000000000000000000000000000000000081526001600160a01b0390911690635fec6dd090610c179087908790879087906004016139fe565b6006546040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015611a22573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a469190613a2f565b905090565b5f805b82811015611c5c575f600454858584818110611a6c57611a6c613829565b9050602002810190611a7e9190613a46565b611a949060200135670de0b6b3a76400006137a5565b611a9e919061389c565b6005549091506001600160a01b031663bc26e7e530878786818110611ac557611ac5613829565b9050602002810190611ad79190613a46565b611ae59060408101906137bc565b858a8a89818110611af857611af8613829565b9050602002810190611b0a9190613a46565b6060016040518663ffffffff1660e01b8152600401611b2d95949392919061370d565b5f604051808303815f87803b158015611b44575f80fd5b505af1158015611b56573d5f803e3d5ffd5b50505050848483818110611b6c57611b6c613829565b9050602002810190611b7e9190613a46565b611b8c9060200135846135e9565b9250337f5f6aa5154aebbcb31c00623ce48195b21d4d2508badf2a5e1f3b512b06eadf96868685818110611bc257611bc2613829565b9050602002810190611bd49190613a46565b611bde90806137bc565b888887818110611bf057611bf0613829565b9050602002810190611c029190613a46565b611c109060408101906137bc565b8a8a89818110611c2257611c22613829565b9050602002810190611c349190613a46565b6020013587604051611c4b96959493929190613a82565b60405180910390a250600101611a4e565b5034811115610a4c5760405162461bcd60e51b815260206004820152603960248201527f546865206e756d626572206f6620657468206d757374206265206c657373207460448201527f68616e206f7220657175616c20746f206d73672e76616c756500000000000000606482015260840161066d565b6002546001600160a01b03163314611d375760405162461bcd60e51b815260206004820152602160248201527f4f6e6c79204478706f6f6c207374616b696e672061646d696e20616c6c6f77656044820152601960fa1b606482015260840161066d565b6003548103611dae5760405162461bcd60e51b815260206004820152603160248201527f6d61782076616c696461746f7273206d75737420626520646966666572656e7460448201527f2066726f6d2063757272656e74206f6e65000000000000000000000000000000606482015260840161066d565b5f8111611dfd5760405162461bcd60e51b815260206004820152601660248201527f4d6178206d75737420626967676572207468616e203000000000000000000000604482015260640161066d565b600355565b6001546001600160a01b03163314611e685760405162461bcd60e51b8152602060048201526024808201527f4f6e6c79204478706f6f6c207374616b696e67206f70657261746f7220616c6c6044820152631bddd95960e21b606482015260840161066d565b6040518181527f4c91e198a90c69c3a662746627f8e6f4b96b582f6acd7e906abc903d80131e389060200160405180910390a1600455565b6002546001600160a01b03163314611f045760405162461bcd60e51b815260206004820152602160248201527f4f6e6c79204478706f6f6c207374616b696e672061646d696e20616c6c6f77656044820152601960fa1b606482015260840161066d565b6040518181527fc6f316165836b9a9ca658ba2e3bbf32b3acff9aca1956fc77393fb506d26b0d69060200160405180910390a1600755565b6002546001600160a01b03163314611fa05760405162461bcd60e51b815260206004820152602160248201527f4f6e6c79204478706f6f6c207374616b696e672061646d696e20616c6c6f77656044820152601960fa1b606482015260840161066d565b610eef6129c8565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff16159067ffffffffffffffff165f81158015611ff25750825b90505f8267ffffffffffffffff16600114801561200e5750303b155b90508115801561201c575080155b15612053576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84547fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000166001178555831561209e57845468ff00000000000000001916680100000000000000001785555b60646003555f80547fffffffffffffffffffffff0000000000000000000000000000000000000000ff166101006001600160a01b038e81169190910291909117909155662386f26fc1000060049081556001805473ffffffffffffffffffffffffffffffffffffffff199081168e8516179091556002805482168d85161790556005805482168c851690811790915560068054909216938b169384179091556040517f095ea7b3000000000000000000000000000000000000000000000000000000008152918201527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602482015263095ea7b3906044016020604051808303815f875af11580156121b2573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906121d6919061378a565b506005546040517fdbcdc2cc0000000000000000000000000000000000000000000000000000000081526001600160a01b0388811660048301529091169063dbcdc2cc906024015f604051808303815f87803b158015612234575f80fd5b505af1158015612246573d5f803e3d5ffd5b50505050831561229557845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050505050565b6001546001600160a01b031633146123085760405162461bcd60e51b8152602060048201526024808201527f4f6e6c79204478706f6f6c207374616b696e67206f70657261746f7220616c6c6044820152631bddd95960e21b606482015260840161066d565b6005546040517f686e682c0000000000000000000000000000000000000000000000000000000081526001600160a01b039091169063686e682c90610c179087908790879087906004016139fe565b6001546001600160a01b031633146123bd5760405162461bcd60e51b8152602060048201526024808201527f4f6e6c79204478706f6f6c207374616b696e67206f70657261746f7220616c6c6044820152631bddd95960e21b606482015260840161066d565b6005546040517fbf0f2fb20000000000000000000000000000000000000000000000000000000081526001600160a01b039091169063bf0f2fb29061240c903090879087908790600401613abe565b5f604051808303815f87803b158015612423575f80fd5b505af1158015612435573d5f803e3d5ffd5b50505050505050565b6004545f9061245534670de0b6b3a76400006137a5565b61245f919061389c565b90505f81116124d65760405162461bcd60e51b815260206004820152602b60248201527f6465706f73697420746f2073737620616d6f756e74206d75737420626520626960448201527f67676572207468616e2030000000000000000000000000000000000000000000606482015260840161066d565b336001600160a01b03167f5f6aa5154aebbcb31c00623ce48195b21d4d2508badf2a5e1f3b512b06eadf9687878787348760405161251996959493929190613a82565b60405180910390a26005546040517fbc26e7e50000000000000000000000000000000000000000000000000000000081526001600160a01b039091169063bc26e7e590612572903090889088908790899060040161370d565b5f604051808303815f87803b158015612589575f80fd5b505af115801561259b573d5f803e3d5ffd5b50505050505050505050565b6001546001600160a01b0316331461260d5760405162461bcd60e51b8152602060048201526024808201527f4f6e6c79204478706f6f6c207374616b696e67206f70657261746f7220616c6c6044820152631bddd95960e21b606482015260840161066d565b6005546040517fdbcdc2cc0000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301529091169063dbcdc2cc906024015f604051808303815f87803b15801561266a575f80fd5b505af115801561267c573d5f803e3d5ffd5b5050505050565b61268b612976565b5f805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586126bf3390565b6040516001600160a01b03909116815260200160405180910390a1565b306001600160a01b037f0000000000000000000000008d7a232d883367c73587090453d19ae428d12b5f16148061277557507f0000000000000000000000008d7a232d883367c73587090453d19ae428d12b5f6001600160a01b03166127697f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b031614155b15610eef576040517fe07c8dba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002546001600160a01b031633146128105760405162461bcd60e51b815260206004820152602160248201527f4f6e6c79204478706f6f6c207374616b696e672061646d696e20616c6c6f77656044820152601960fa1b606482015260840161066d565b50565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561286d575060408051601f3d908101601f1916820190925261286a91810190613a2f565b60015b6128ae576040517f4c9c8ce30000000000000000000000000000000000000000000000000000000081526001600160a01b038316600482015260240161066d565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc811461290a576040517faa1d49a40000000000000000000000000000000000000000000000000000000081526004810182905260240161066d565b610a4c8383612a00565b306001600160a01b037f0000000000000000000000008d7a232d883367c73587090453d19ae428d12b5f1614610eef576040517fe07c8dba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5460ff1615610eef5760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015260640161066d565b6129d0612a55565b5f805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa336126bf565b612a0982612aa6565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a2805115612a4d57610a4c8282612b42565b61109b612bb6565b5f5460ff16610eef5760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015260640161066d565b806001600160a01b03163b5f03612af4576040517f4c9c8ce30000000000000000000000000000000000000000000000000000000081526001600160a01b038216600482015260240161066d565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b60605f80846001600160a01b031684604051612b5e9190613aef565b5f60405180830381855af49150503d805f8114612b96576040519150601f19603f3d011682016040523d82523d5f602084013e612b9b565b606091505b5091509150612bab858383612bee565b925050505b92915050565b3415610eef576040517fb398979f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606082612c0357612bfe82612c66565b612c5f565b8151158015612c1a57506001600160a01b0384163b155b15612c5c576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b038516600482015260240161066d565b50805b9392505050565b805115612c765780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0381168114612810575f80fd5b5f8060408385031215612ccd575f80fd5b8235612cd881612ca8565b91506020830135612ce881612ca8565b809150509250929050565b5f8083601f840112612d03575f80fd5b50813567ffffffffffffffff811115612d1a575f80fd5b602083019150836020828501011115612d31575f80fd5b9250929050565b5f8083601f840112612d48575f80fd5b50813567ffffffffffffffff811115612d5f575f80fd5b6020830191508360208260051b8501011115612d31575f80fd5b5f60a08284031215612d89575f80fd5b50919050565b5f805f805f805f80610120898b031215612da7575f80fd5b883567ffffffffffffffff811115612dbd575f80fd5b612dc98b828c01612cf3565b909950975050602089013567ffffffffffffffff811115612de8575f80fd5b612df48b828c01612d38565b909750955050604089013567ffffffffffffffff811115612e13575f80fd5b612e1f8b828c01612cf3565b90955093505060608901359150612e398a60808b01612d79565b90509295985092959890939650565b5f805f805f60e08688031215612e5c575f80fd5b853567ffffffffffffffff811115612e72575f80fd5b612e7e88828901612cf3565b909650945050602086013567ffffffffffffffff811115612e9d575f80fd5b612ea988828901612d38565b9094509250612ebd90508760408801612d79565b90509295509295909350565b5f8060408385031215612eda575f80fd5b8235612ee581612ca8565b946020939093013593505050565b5f805f805f805f80610120898b031215612f0b575f80fd5b883567ffffffffffffffff811115612f21575f80fd5b612f2d8b828c01612d38565b909950975050602089013567ffffffffffffffff811115612f4c575f80fd5b612f588b828c01612d38565b909750955050604089013567ffffffffffffffff811115612f77575f80fd5b612e1f8b828c01612d38565b5f805f8060e08587031215612f96575f80fd5b843567ffffffffffffffff811115612fac575f80fd5b612fb887828801612d38565b9095509350612fcc90508660208701612d79565b9396929550929360c00135925050565b5f60208284031215612fec575f80fd5b8135612c5f81612ca8565b5f805f806040858703121561300a575f80fd5b843567ffffffffffffffff811115613020575f80fd5b61302c87828801612d38565b909550935050602085013567ffffffffffffffff81111561304b575f80fd5b61305787828801612d38565b95989497509550505050565b5f805f8060408587031215613076575f80fd5b843567ffffffffffffffff81111561308c575f80fd5b61302c87828801612cf3565b634e487b7160e01b5f52604160045260245ffd5b5f80604083850312156130bd575f80fd5b82356130c881612ca8565b9150602083013567ffffffffffffffff8111156130e3575f80fd5b8301601f810185136130f3575f80fd5b803567ffffffffffffffff81111561310d5761310d613098565b604051601f19603f601f19601f8501160116810181811067ffffffffffffffff8211171561313d5761313d613098565b604052818152828201602001871015613154575f80fd5b816020840160208301375f602083830101528093505050509250929050565b5f6101008284031215612d89575f80fd5b5f805f805f805f805f60a08a8c03121561319c575f80fd5b893567ffffffffffffffff8111156131b2575f80fd5b6131be8c828d01612cf3565b909a5098505060208a013567ffffffffffffffff8111156131dd575f80fd5b6131e98c828d01612cf3565b90985096505060408a013567ffffffffffffffff811115613208575f80fd5b6132148c828d01612cf3565b90965094505060608a013567ffffffffffffffff811115613233575f80fd5b61323f8c828d01612d38565b90945092505060808a013567ffffffffffffffff81111561325e575f80fd5b61326a8c828d01613173565b9150509295985092959850929598565b5f805f805f60e0868803121561328e575f80fd5b853567ffffffffffffffff8111156132a4575f80fd5b612e7e88828901612d38565b5f805f8060e085870312156132c3575f80fd5b843567ffffffffffffffff8111156132d9575f80fd5b6132e587828801612d38565b909550935050602085013591506132ff8660408701612d79565b905092959194509250565b5f806020838503121561331b575f80fd5b823567ffffffffffffffff811115613331575f80fd5b61333d85828601612d38565b90969095509350505050565b5f60208284031215613359575f80fd5b5035919050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f612c5f6020830184613360565b5f805f805f8060c087890312156133b5575f80fd5b86356133c081612ca8565b955060208701356133d081612ca8565b945060408701356133e081612ca8565b935060608701356133f081612ca8565b9250608087013561340081612ca8565b915060a087013561341081612ca8565b809150509295509295509295565b5f805f60c08486031215613430575f80fd5b833567ffffffffffffffff811115613446575f80fd5b61345286828701612d38565b909450925061346690508560208601612d79565b90509250925092565b81835281816020850137505f602082840101525f6020601f19601f840116840101905092915050565b803567ffffffffffffffff811681146134af575f80fd5b919050565b8183526020830192505f815f5b848110156134f15767ffffffffffffffff6134db83613498565b16865260209586019591909101906001016134c1565b5093949350505050565b8015158114612810575f80fd5b803563ffffffff811680821461351c575f80fd5b83525067ffffffffffffffff61353460208301613498565b16602083015267ffffffffffffffff61354f60408301613498565b1660408301526060810135613563816134fb565b15156060830152608090810135910152565b61012081525f61358a61012083018a8c61346f565b828103602084015261359d81898b6134b4565b905082810360408401526135b281878961346f565b9150508360608301526135c86080830184613508565b9998505050505050505050565b634e487b7160e01b5f52601160045260245ffd5b80820180821115612bb057612bb06135d5565b60e081525f61360f60e08301878961346f565b82810360208401526136228186886134b4565b9150506136326040830184613508565b9695505050505050565b5f8383855260208501945060208460051b820101835f5b868110156136c457601f198484030188528135601e19873603018112613677575f80fd5b860160208101903567ffffffffffffffff811115613693575f80fd5b8036038213156136a1575f80fd5b6136ac85828461346f565b60209a8b019a90955093909301925050600101613653565b50909695505050505050565b61012081525f6136e561012083018a8c61363c565b82810360208401526136f881898b6134b4565b905082810360408401526135b281878961363c565b6001600160a01b038616815261010060208201525f613731610100830186886134b4565b90508360408301526136326060830184613508565b604081525f61375960408301868861363c565b828103602084015261376c8185876134b4565b979650505050505050565b604081525f61375960408301868861346f565b5f6020828403121561379a575f80fd5b8151612c5f816134fb565b8082028115828204841417612bb057612bb06135d5565b5f808335601e198436030181126137d1575f80fd5b83018035915067ffffffffffffffff8211156137eb575f80fd5b6020019150600581901b3603821315612d31575f80fd5b5f8085851115613810575f80fd5b8386111561381c575f80fd5b5050820193919092039150565b634e487b7160e01b5f52603260045260245ffd5b608081525f61384f6080830188613360565b828103602084015261386281878961346f565b905082810360408401526138768186613360565b9150508260608301529695505050505050565b81810381811115612bb057612bb06135d5565b5f826138b657634e487b7160e01b5f52601260045260245ffd5b500490565b5f808335601e198436030181126138d0575f80fd5b83018035915067ffffffffffffffff8211156138ea575f80fd5b602001915036819003821315612d31575f80fd5b5f61012082016101208352808a51808352610140850191506101408160051b860101925060208c015f5b82811015613977577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec0878603018452613962858351613360565b94506020938401939190910190600101613928565b50505050828103602084015261398e81898b6134b4565b905082810360408401526139a381878961363c565b9150508360608301526139b96080830184613508565b98975050505050505050565b606081525f6139d86060830186886134b4565b6020830194909452506040015292915050565b60e081525f61360f60e08301878961363c565b60e081525f613a1160e0830186886134b4565b9050836020830152613a266040830184613508565b95945050505050565b5f60208284031215613a3f575f80fd5b5051919050565b5f82357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01833603018112613a78575f80fd5b9190910192915050565b608081525f613a9560808301888a61363c565b8281036020840152613aa88187896134b4565b6040840195909552505060600152949350505050565b6001600160a01b038516815260e060208201525f613ae060e0830185876134b4565b9050613a266040830184613508565b5f82518060208501845e5f92019182525091905056fea264697066735822122067579d8e2989673ac0c9e3459d87ed95fa99da11e3dc08bb9565e9ba5499eb5e64736f6c634300081a0033
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.