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