Source Code
Overview
ETH Balance
0 ETH
More Info
ContractCreator
Multichain Info
N/A
Latest 25 from a total of 4,107 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Deposit | 1438754 | 221 days ago | IN | 8 ETH | 0.00445515 | ||||
Deposit | 1427207 | 223 days ago | IN | 8 ETH | 0.00507005 | ||||
Deposit | 1412072 | 225 days ago | IN | 8 ETH | 0.00535439 | ||||
Deposit | 1412070 | 225 days ago | IN | 8 ETH | 0.00585843 | ||||
Deposit | 1412067 | 225 days ago | IN | 8 ETH | 0.00620505 | ||||
Deposit | 1412064 | 225 days ago | IN | 8 ETH | 0.00588137 | ||||
Deposit | 1404202 | 227 days ago | IN | 8 ETH | 0.00534821 | ||||
Deposit | 1396855 | 228 days ago | IN | 8 ETH | 0.00014557 | ||||
Deposit | 1392558 | 228 days ago | IN | 8 ETH | 0.00473713 | ||||
Deposit | 1391085 | 229 days ago | IN | 8 ETH | 0.00481492 | ||||
Deposit | 1375289 | 231 days ago | IN | 8 ETH | 0.00734722 | ||||
Deposit | 1369415 | 232 days ago | IN | 8 ETH | 0.00549738 | ||||
Deposit | 1369413 | 232 days ago | IN | 8 ETH | 0.00575301 | ||||
Deposit | 1369410 | 232 days ago | IN | 8 ETH | 0.00556656 | ||||
Deposit | 1369408 | 232 days ago | IN | 8 ETH | 0.00587901 | ||||
Deposit | 1369405 | 232 days ago | IN | 8 ETH | 0.00556278 | ||||
Deposit | 1369403 | 232 days ago | IN | 8 ETH | 0.00589416 | ||||
Deposit | 1369400 | 232 days ago | IN | 8 ETH | 0.0052326 | ||||
Deposit | 1369398 | 232 days ago | IN | 8 ETH | 0.00533477 | ||||
Deposit | 1369396 | 232 days ago | IN | 8 ETH | 0.00513974 | ||||
Deposit | 1369395 | 232 days ago | IN | 8 ETH | 0.00539215 | ||||
Deposit | 1369392 | 232 days ago | IN | 8 ETH | 0.00491865 | ||||
Deposit | 1369390 | 232 days ago | IN | 8 ETH | 0.00504874 | ||||
Deposit | 1369387 | 232 days ago | IN | 8 ETH | 0.00479596 | ||||
Deposit | 1369383 | 232 days ago | IN | 8 ETH | 0.00488721 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
1438754 | 221 days ago | 1 ETH | ||||
1438754 | 221 days ago | 7 ETH | ||||
1427207 | 223 days ago | 1 ETH | ||||
1427207 | 223 days ago | 7 ETH | ||||
1412072 | 225 days ago | 1 ETH | ||||
1412072 | 225 days ago | 7 ETH | ||||
1412070 | 225 days ago | 1 ETH | ||||
1412070 | 225 days ago | 7 ETH | ||||
1412067 | 225 days ago | 1 ETH | ||||
1412067 | 225 days ago | 7 ETH | ||||
1412064 | 225 days ago | 1 ETH | ||||
1412064 | 225 days ago | 7 ETH | ||||
1404202 | 227 days ago | 1 ETH | ||||
1404202 | 227 days ago | 7 ETH | ||||
1392558 | 228 days ago | 1 ETH | ||||
1392558 | 228 days ago | 7 ETH | ||||
1391085 | 229 days ago | 1 ETH | ||||
1391085 | 229 days ago | 7 ETH | ||||
1375289 | 231 days ago | 1 ETH | ||||
1375289 | 231 days ago | 7 ETH | ||||
1369415 | 232 days ago | 1 ETH | ||||
1369415 | 232 days ago | 7 ETH | ||||
1369413 | 232 days ago | 1 ETH | ||||
1369413 | 232 days ago | 7 ETH | ||||
1369410 | 232 days ago | 1 ETH |
Loading...
Loading
Contract Name:
RocketNodeDeposit
Compiler Version
v0.7.6+commit.7338295f
Contract Source Code (Solidity Standard Json-Input format)
/** * . * / \ * |.'.| * |'.'| * ,'| |`. * |,-'-|-'-.| * __|_| | _ _ _____ _ * | ___ \| | | | | | ___ \ | | * | |_/ /|__ ___| | _____| |_ | |_/ /__ ___ | | * | // _ \ / __| |/ / _ \ __| | __/ _ \ / _ \| | * | |\ \ (_) | (__| < __/ |_ | | | (_) | (_) | | * \_| \_\___/ \___|_|\_\___|\__| \_| \___/ \___/|_| * +---------------------------------------------------+ * | DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0 | * +---------------------------------------------------+ * * Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned, * decentralised, trustless and compatible with staking in Ethereum 2.0. * * For more information about Rocket Pool, visit https://rocketpool.net * * Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty * */ // SPDX-License-Identifier: GPL-3.0-only pragma solidity 0.7.6; import "@openzeppelin/contracts/math/SafeMath.sol"; import "../RocketBase.sol"; import "../../interface/deposit/RocketDepositPoolInterface.sol"; import "../../interface/minipool/RocketMinipoolInterface.sol"; import "../../interface/minipool/RocketMinipoolManagerInterface.sol"; import "../../interface/minipool/RocketMinipoolQueueInterface.sol"; import "../../interface/network/RocketNetworkFeesInterface.sol"; import "../../interface/node/RocketNodeDepositInterface.sol"; import "../../interface/dao/protocol/settings/RocketDAOProtocolSettingsDepositInterface.sol"; import "../../interface/dao/protocol/settings/RocketDAOProtocolSettingsMinipoolInterface.sol"; import "../../interface/dao/protocol/settings/RocketDAOProtocolSettingsNodeInterface.sol"; import "../../interface/dao/protocol/settings/RocketDAOProtocolSettingsNetworkInterface.sol"; import "../../interface/dao/node/RocketDAONodeTrustedInterface.sol"; import "../../interface/dao/node/settings/RocketDAONodeTrustedSettingsMembersInterface.sol"; import "../../types/MinipoolDeposit.sol"; import "../../interface/node/RocketNodeManagerInterface.sol"; import "../../interface/RocketVaultInterface.sol"; import "../../interface/node/RocketNodeStakingInterface.sol"; /// @notice Handles node deposits and minipool creation contract RocketNodeDeposit is RocketBase, RocketNodeDepositInterface { // Libs using SafeMath for uint; // Events event DepositReceived(address indexed from, uint256 amount, uint256 time); constructor(RocketStorageInterface _rocketStorageAddress) RocketBase(_rocketStorageAddress) { version = 3; } /// @dev Accept incoming ETH from the deposit pool receive() external payable onlyLatestContract("rocketDepositPool", msg.sender) {} /// @notice Returns a node operator's credit balance in wei function getNodeDepositCredit(address _nodeOperator) override public view returns (uint256) { return getUint(keccak256(abi.encodePacked("node.deposit.credit.balance", _nodeOperator))); } /// @dev Increases a node operators deposit credit balance function increaseDepositCreditBalance(address _nodeOperator, uint256 _amount) override external onlyLatestContract("rocketNodeDeposit", address(this)) { // Accept calls from network contracts or registered minipools require(getBool(keccak256(abi.encodePacked("minipool.exists", msg.sender))) || getBool(keccak256(abi.encodePacked("contract.exists", msg.sender))), "Invalid or outdated network contract"); // Increase credit balance addUint(keccak256(abi.encodePacked("node.deposit.credit.balance", _nodeOperator)), _amount); } /// @notice Accept a node deposit and create a new minipool under the node. Only accepts calls from registered nodes /// @param _bondAmount The amount of capital the node operator wants to put up as his bond /// @param _minimumNodeFee Transaction will revert if network commission rate drops below this amount /// @param _validatorPubkey Pubkey of the validator the node operator wishes to migrate /// @param _validatorSignature Signature from the validator over the deposit data /// @param _depositDataRoot The hash tree root of the deposit data (passed onto the deposit contract on pre stake) /// @param _salt Salt used to deterministically construct the minipool's address /// @param _expectedMinipoolAddress The expected deterministic minipool address. Will revert if it doesn't match function deposit(uint256 _bondAmount, uint256 _minimumNodeFee, bytes calldata _validatorPubkey, bytes calldata _validatorSignature, bytes32 _depositDataRoot, uint256 _salt, address _expectedMinipoolAddress) override external payable onlyLatestContract("rocketNodeDeposit", address(this)) onlyRegisteredNode(msg.sender) { // Check amount require(msg.value == _bondAmount, "Invalid value"); // Process the deposit _deposit(_bondAmount, _minimumNodeFee, _validatorPubkey, _validatorSignature, _depositDataRoot, _salt, _expectedMinipoolAddress); } /// @notice Accept a node deposit and create a new minipool under the node. Only accepts calls from registered nodes /// @param _bondAmount The amount of capital the node operator wants to put up as his bond /// @param _minimumNodeFee Transaction will revert if network commission rate drops below this amount /// @param _validatorPubkey Pubkey of the validator the node operator wishes to migrate /// @param _validatorSignature Signature from the validator over the deposit data /// @param _depositDataRoot The hash tree root of the deposit data (passed onto the deposit contract on pre stake) /// @param _salt Salt used to deterministically construct the minipool's address /// @param _expectedMinipoolAddress The expected deterministic minipool address. Will revert if it doesn't match function depositWithCredit(uint256 _bondAmount, uint256 _minimumNodeFee, bytes calldata _validatorPubkey, bytes calldata _validatorSignature, bytes32 _depositDataRoot, uint256 _salt, address _expectedMinipoolAddress) override external payable onlyLatestContract("rocketNodeDeposit", address(this)) onlyRegisteredNode(msg.sender) { // Query node's deposit credit uint256 credit = getNodeDepositCredit(msg.sender); // Credit balance accounting if (credit < _bondAmount) { uint256 shortFall = _bondAmount.sub(credit); require(msg.value == shortFall, "Invalid value"); setUint(keccak256(abi.encodePacked("node.deposit.credit.balance", msg.sender)), 0); } else { require(msg.value == 0, "Invalid value"); subUint(keccak256(abi.encodePacked("node.deposit.credit.balance", msg.sender)), _bondAmount); } // Process the deposit _deposit(_bondAmount, _minimumNodeFee, _validatorPubkey, _validatorSignature, _depositDataRoot, _salt, _expectedMinipoolAddress); } /// @notice Returns true if the given amount is a valid deposit amount function isValidDepositAmount(uint256 _amount) override public pure returns (bool) { return _amount == 16 ether || _amount == 8 ether; } /// @notice Returns an array of valid deposit amounts function getDepositAmounts() override external pure returns (uint256[] memory) { uint256[] memory amounts = new uint256[](2); amounts[0] = 16 ether; amounts[1] = 8 ether; return amounts; } /// @dev Internal logic to process a deposit function _deposit(uint256 _bondAmount, uint256 _minimumNodeFee, bytes calldata _validatorPubkey, bytes calldata _validatorSignature, bytes32 _depositDataRoot, uint256 _salt, address _expectedMinipoolAddress) private { // Check pre-conditions checkDepositsEnabled(); checkDistributorInitialised(); checkNodeFee(_minimumNodeFee); require(isValidDepositAmount(_bondAmount), "Invalid deposit amount"); // Get launch constants uint256 launchAmount; uint256 preLaunchValue; { RocketDAOProtocolSettingsMinipoolInterface rocketDAOProtocolSettingsMinipool = RocketDAOProtocolSettingsMinipoolInterface(getContractAddress("rocketDAOProtocolSettingsMinipool")); launchAmount = rocketDAOProtocolSettingsMinipool.getLaunchBalance(); preLaunchValue = rocketDAOProtocolSettingsMinipool.getPreLaunchValue(); } // Check that pre deposit won't fail if (msg.value < preLaunchValue) { RocketDepositPoolInterface rocketDepositPool = RocketDepositPoolInterface(getContractAddress("rocketDepositPool")); require(preLaunchValue.sub(msg.value) <= rocketDepositPool.getBalance(), "Deposit pool balance is insufficient for pre deposit"); } // Emit deposit received event emit DepositReceived(msg.sender, msg.value, block.timestamp); // Increase ETH matched (used to calculate RPL collateral requirements) _increaseEthMatched(msg.sender, launchAmount.sub(_bondAmount)); // Create the minipool RocketMinipoolInterface minipool = createMinipool(_salt, _expectedMinipoolAddress); // Process node deposit _processNodeDeposit(preLaunchValue, _bondAmount); // Perform the pre deposit minipool.preDeposit{value: preLaunchValue}(_bondAmount, _validatorPubkey, _validatorSignature, _depositDataRoot); // Enqueue the minipool enqueueMinipool(address(minipool)); // Assign deposits if enabled assignDeposits(); } /// @dev Processes a node deposit with the deposit pool /// @param _preLaunchValue The prelaunch value (result of call to `RocketDAOProtocolSettingsMinipool.getPreLaunchValue()` /// @param _bondAmount The bond amount for this deposit function _processNodeDeposit(uint256 _preLaunchValue, uint256 _bondAmount) private { // Get contracts RocketDepositPoolInterface rocketDepositPool = RocketDepositPoolInterface(getContractAddress("rocketDepositPool")); // Retrieve ETH from deposit pool if required uint256 shortFall = 0; if (msg.value < _preLaunchValue) { shortFall = _preLaunchValue.sub(msg.value); rocketDepositPool.nodeCreditWithdrawal(shortFall); } uint256 remaining = msg.value.add(shortFall).sub(_preLaunchValue); // Deposit the left over value into the deposit pool rocketDepositPool.nodeDeposit{value: remaining}(_bondAmount.sub(_preLaunchValue)); } /// @notice Creates a "vacant" minipool which a node operator can use to migrate a validator with a BLS withdrawal credential /// @param _bondAmount The amount of capital the node operator wants to put up as his bond /// @param _minimumNodeFee Transaction will revert if network commission rate drops below this amount /// @param _validatorPubkey Pubkey of the validator the node operator wishes to migrate /// @param _salt Salt used to deterministically construct the minipool's address /// @param _expectedMinipoolAddress The expected deterministic minipool address. Will revert if it doesn't match /// @param _currentBalance The current balance of the validator on the beaconchain (will be checked by oDAO and scrubbed if not correct) function createVacantMinipool(uint256 _bondAmount, uint256 _minimumNodeFee, bytes calldata _validatorPubkey, uint256 _salt, address _expectedMinipoolAddress, uint256 _currentBalance) override external onlyLatestContract("rocketNodeDeposit", address(this)) onlyRegisteredNode(msg.sender) { // Check pre-conditions checkVacantMinipoolsEnabled(); checkDistributorInitialised(); checkNodeFee(_minimumNodeFee); require(isValidDepositAmount(_bondAmount), "Invalid deposit amount"); // Increase ETH matched (used to calculate RPL collateral requirements) RocketDAOProtocolSettingsMinipoolInterface rocketDAOProtocolSettingsMinipool = RocketDAOProtocolSettingsMinipoolInterface(getContractAddress("rocketDAOProtocolSettingsMinipool")); uint256 launchAmount = rocketDAOProtocolSettingsMinipool.getLaunchBalance(); _increaseEthMatched(msg.sender, launchAmount.sub(_bondAmount)); // Create the minipool _createVacantMinipool(_salt, _validatorPubkey, _bondAmount, _expectedMinipoolAddress, _currentBalance); } /// @notice Called by minipools during bond reduction to increase the amount of ETH the node operator has /// @param _nodeAddress The node operator's address to increase the ETH matched for /// @param _amount The amount to increase the ETH matched /// @dev Will revert if the new ETH matched amount exceeds the node operators limit function increaseEthMatched(address _nodeAddress, uint256 _amount) override external onlyLatestContract("rocketNodeDeposit", address(this)) onlyLatestNetworkContract() { _increaseEthMatched(_nodeAddress, _amount); } /// @dev Increases the amount of ETH that has been matched against a node operators bond. Reverts if it exceeds the /// collateralisation requirements of the network function _increaseEthMatched(address _nodeAddress, uint256 _amount) private { // Check amount doesn't exceed limits RocketNodeStakingInterface rocketNodeStaking = RocketNodeStakingInterface(getContractAddress("rocketNodeStaking")); uint256 ethMatched = rocketNodeStaking.getNodeETHMatched(_nodeAddress).add(_amount); require( ethMatched <= rocketNodeStaking.getNodeETHMatchedLimit(_nodeAddress), "ETH matched after deposit exceeds limit based on node RPL stake" ); setUint(keccak256(abi.encodePacked("eth.matched.node.amount", _nodeAddress)), ethMatched); } /// @dev Adds a minipool to the queue function enqueueMinipool(address _minipoolAddress) private { // Add minipool to queue RocketMinipoolQueueInterface(getContractAddress("rocketMinipoolQueue")).enqueueMinipool(_minipoolAddress); } /// @dev Reverts if node operator has not initialised their fee distributor function checkDistributorInitialised() private view { // Check node has initialised their fee distributor RocketNodeManagerInterface rocketNodeManager = RocketNodeManagerInterface(getContractAddress("rocketNodeManager")); require(rocketNodeManager.getFeeDistributorInitialised(msg.sender), "Fee distributor not initialised"); } /// @dev Creates a minipool and returns an instance of it /// @param _salt The salt used to determine the minipools address /// @param _expectedMinipoolAddress The expected minipool address. Reverts if not correct function createMinipool(uint256 _salt, address _expectedMinipoolAddress) private returns (RocketMinipoolInterface) { // Load contracts RocketMinipoolManagerInterface rocketMinipoolManager = RocketMinipoolManagerInterface(getContractAddress("rocketMinipoolManager")); // Check minipool doesn't exist or previously exist require(!rocketMinipoolManager.getMinipoolExists(_expectedMinipoolAddress) && !rocketMinipoolManager.getMinipoolDestroyed(_expectedMinipoolAddress), "Minipool already exists or was previously destroyed"); // Create minipool RocketMinipoolInterface minipool = rocketMinipoolManager.createMinipool(msg.sender, _salt); // Ensure minipool address matches expected require(address(minipool) == _expectedMinipoolAddress, "Unexpected minipool address"); // Return return minipool; } /// @dev Creates a vacant minipool and returns an instance of it /// @param _salt The salt used to determine the minipools address /// @param _validatorPubkey Pubkey of the validator owning this minipool /// @param _bondAmount ETH value the node operator is putting up as capital for this minipool /// @param _expectedMinipoolAddress The expected minipool address. Reverts if not correct /// @param _currentBalance The current balance of the validator on the beaconchain (will be checked by oDAO and scrubbed if not correct) function _createVacantMinipool(uint256 _salt, bytes calldata _validatorPubkey, uint256 _bondAmount, address _expectedMinipoolAddress, uint256 _currentBalance) private returns (RocketMinipoolInterface) { // Load contracts RocketMinipoolManagerInterface rocketMinipoolManager = RocketMinipoolManagerInterface(getContractAddress("rocketMinipoolManager")); // Check minipool doesn't exist or previously exist require(!rocketMinipoolManager.getMinipoolExists(_expectedMinipoolAddress) && !rocketMinipoolManager.getMinipoolDestroyed(_expectedMinipoolAddress), "Minipool already exists or was previously destroyed"); // Create minipool RocketMinipoolInterface minipool = rocketMinipoolManager.createVacantMinipool(msg.sender, _salt, _validatorPubkey, _bondAmount, _currentBalance); // Ensure minipool address matches expected require(address(minipool) == _expectedMinipoolAddress, "Unexpected minipool address"); // Return return minipool; } /// @dev Reverts if network node fee is below a minimum /// @param _minimumNodeFee The minimum node fee required to not revert function checkNodeFee(uint256 _minimumNodeFee) private view { // Load contracts RocketNetworkFeesInterface rocketNetworkFees = RocketNetworkFeesInterface(getContractAddress("rocketNetworkFees")); // Check current node fee uint256 nodeFee = rocketNetworkFees.getNodeFee(); require(nodeFee >= _minimumNodeFee, "Minimum node fee exceeds current network node fee"); } /// @dev Reverts if deposits are not enabled function checkDepositsEnabled() private view { // Get contracts RocketDAOProtocolSettingsNodeInterface rocketDAOProtocolSettingsNode = RocketDAOProtocolSettingsNodeInterface(getContractAddress("rocketDAOProtocolSettingsNode")); // Check node settings require(rocketDAOProtocolSettingsNode.getDepositEnabled(), "Node deposits are currently disabled"); } /// @dev Reverts if vacant minipools are not enabled function checkVacantMinipoolsEnabled() private view { // Get contracts RocketDAOProtocolSettingsNodeInterface rocketDAOProtocolSettingsNode = RocketDAOProtocolSettingsNodeInterface(getContractAddress("rocketDAOProtocolSettingsNode")); // Check node settings require(rocketDAOProtocolSettingsNode.getVacantMinipoolsEnabled(), "Vacant minipools are currently disabled"); } /// @dev Executes an assignDeposits call on the deposit pool function assignDeposits() private { RocketDepositPoolInterface rocketDepositPool = RocketDepositPoolInterface(getContractAddress("rocketDepositPool")); rocketDepositPool.maybeAssignDeposits(); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b > a) return (false, 0); return (true, a - b); } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a / b); } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a % b); } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "SafeMath: subtraction overflow"); return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) return 0; uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: division by zero"); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: modulo by zero"); return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); return a - b; } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryDiv}. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); return a % b; } }
/** * . * / \ * |.'.| * |'.'| * ,'| |`. * |,-'-|-'-.| * __|_| | _ _ _____ _ * | ___ \| | | | | | ___ \ | | * | |_/ /|__ ___| | _____| |_ | |_/ /__ ___ | | * | // _ \ / __| |/ / _ \ __| | __/ _ \ / _ \| | * | |\ \ (_) | (__| < __/ |_ | | | (_) | (_) | | * \_| \_\___/ \___|_|\_\___|\__| \_| \___/ \___/|_| * +---------------------------------------------------+ * | DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0 | * +---------------------------------------------------+ * * Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned, * decentralised, trustless and compatible with staking in Ethereum 2.0. * * For more information about Rocket Pool, visit https://rocketpool.net * * Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty * */ pragma solidity >0.5.0 <0.9.0; // SPDX-License-Identifier: GPL-3.0-only interface RocketStorageInterface { // Deploy status function getDeployedStatus() external view returns (bool); // Guardian function getGuardian() external view returns(address); function setGuardian(address _newAddress) external; function confirmGuardian() external; // Getters function getAddress(bytes32 _key) external view returns (address); function getUint(bytes32 _key) external view returns (uint); function getString(bytes32 _key) external view returns (string memory); function getBytes(bytes32 _key) external view returns (bytes memory); function getBool(bytes32 _key) external view returns (bool); function getInt(bytes32 _key) external view returns (int); function getBytes32(bytes32 _key) external view returns (bytes32); // Setters function setAddress(bytes32 _key, address _value) external; function setUint(bytes32 _key, uint _value) external; function setString(bytes32 _key, string calldata _value) external; function setBytes(bytes32 _key, bytes calldata _value) external; function setBool(bytes32 _key, bool _value) external; function setInt(bytes32 _key, int _value) external; function setBytes32(bytes32 _key, bytes32 _value) external; // Deleters function deleteAddress(bytes32 _key) external; function deleteUint(bytes32 _key) external; function deleteString(bytes32 _key) external; function deleteBytes(bytes32 _key) external; function deleteBool(bytes32 _key) external; function deleteInt(bytes32 _key) external; function deleteBytes32(bytes32 _key) external; // Arithmetic function addUint(bytes32 _key, uint256 _amount) external; function subUint(bytes32 _key, uint256 _amount) external; // Protected storage function getNodeWithdrawalAddress(address _nodeAddress) external view returns (address); function getNodePendingWithdrawalAddress(address _nodeAddress) external view returns (address); function setWithdrawalAddress(address _nodeAddress, address _newWithdrawalAddress, bool _confirm) external; function confirmWithdrawalAddress(address _nodeAddress) external; }
/** * . * / \ * |.'.| * |'.'| * ,'| |`. * |,-'-|-'-.| * __|_| | _ _ _____ _ * | ___ \| | | | | | ___ \ | | * | |_/ /|__ ___| | _____| |_ | |_/ /__ ___ | | * | // _ \ / __| |/ / _ \ __| | __/ _ \ / _ \| | * | |\ \ (_) | (__| < __/ |_ | | | (_) | (_) | | * \_| \_\___/ \___|_|\_\___|\__| \_| \___/ \___/|_| * +---------------------------------------------------+ * | DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0 | * +---------------------------------------------------+ * * Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned, * decentralised, trustless and compatible with staking in Ethereum 2.0. * * For more information about Rocket Pool, visit https://rocketpool.net * * Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty * */ pragma solidity 0.7.6; // SPDX-License-Identifier: GPL-3.0-only import "../interface/RocketStorageInterface.sol"; /// @title Base settings / modifiers for each contract in Rocket Pool /// @author David Rugendyke abstract contract RocketBase { // Calculate using this as the base uint256 constant calcBase = 1 ether; // Version of the contract uint8 public version; // The main storage contract where primary persistant storage is maintained RocketStorageInterface rocketStorage = RocketStorageInterface(0); /*** Modifiers **********************************************************/ /** * @dev Throws if called by any sender that doesn't match a Rocket Pool network contract */ modifier onlyLatestNetworkContract() { require(getBool(keccak256(abi.encodePacked("contract.exists", msg.sender))), "Invalid or outdated network contract"); _; } /** * @dev Throws if called by any sender that doesn't match one of the supplied contract or is the latest version of that contract */ modifier onlyLatestContract(string memory _contractName, address _contractAddress) { require(_contractAddress == getAddress(keccak256(abi.encodePacked("contract.address", _contractName))), "Invalid or outdated contract"); _; } /** * @dev Throws if called by any sender that isn't a registered node */ modifier onlyRegisteredNode(address _nodeAddress) { require(getBool(keccak256(abi.encodePacked("node.exists", _nodeAddress))), "Invalid node"); _; } /** * @dev Throws if called by any sender that isn't a trusted node DAO member */ modifier onlyTrustedNode(address _nodeAddress) { require(getBool(keccak256(abi.encodePacked("dao.trustednodes.", "member", _nodeAddress))), "Invalid trusted node"); _; } /** * @dev Throws if called by any sender that isn't a registered minipool */ modifier onlyRegisteredMinipool(address _minipoolAddress) { require(getBool(keccak256(abi.encodePacked("minipool.exists", _minipoolAddress))), "Invalid minipool"); _; } /** * @dev Throws if called by any account other than a guardian account (temporary account allowed access to settings before DAO is fully enabled) */ modifier onlyGuardian() { require(msg.sender == rocketStorage.getGuardian(), "Account is not a temporary guardian"); _; } /*** Methods **********************************************************/ /// @dev Set the main Rocket Storage address constructor(RocketStorageInterface _rocketStorageAddress) { // Update the contract address rocketStorage = RocketStorageInterface(_rocketStorageAddress); } /// @dev Get the address of a network contract by name function getContractAddress(string memory _contractName) internal view returns (address) { // Get the current contract address address contractAddress = getAddress(keccak256(abi.encodePacked("contract.address", _contractName))); // Check it require(contractAddress != address(0x0), "Contract not found"); // Return return contractAddress; } /// @dev Get the address of a network contract by name (returns address(0x0) instead of reverting if contract does not exist) function getContractAddressUnsafe(string memory _contractName) internal view returns (address) { // Get the current contract address address contractAddress = getAddress(keccak256(abi.encodePacked("contract.address", _contractName))); // Return return contractAddress; } /// @dev Get the name of a network contract by address function getContractName(address _contractAddress) internal view returns (string memory) { // Get the contract name string memory contractName = getString(keccak256(abi.encodePacked("contract.name", _contractAddress))); // Check it require(bytes(contractName).length > 0, "Contract not found"); // Return return contractName; } /// @dev Get revert error message from a .call method function getRevertMsg(bytes memory _returnData) internal pure returns (string memory) { // If the _res length is less than 68, then the transaction failed silently (without a revert message) if (_returnData.length < 68) return "Transaction reverted silently"; assembly { // Slice the sighash. _returnData := add(_returnData, 0x04) } return abi.decode(_returnData, (string)); // All that remains is the revert string } /*** Rocket Storage Methods ****************************************/ // Note: Unused helpers have been removed to keep contract sizes down /// @dev Storage get methods function getAddress(bytes32 _key) internal view returns (address) { return rocketStorage.getAddress(_key); } function getUint(bytes32 _key) internal view returns (uint) { return rocketStorage.getUint(_key); } function getString(bytes32 _key) internal view returns (string memory) { return rocketStorage.getString(_key); } function getBytes(bytes32 _key) internal view returns (bytes memory) { return rocketStorage.getBytes(_key); } function getBool(bytes32 _key) internal view returns (bool) { return rocketStorage.getBool(_key); } function getInt(bytes32 _key) internal view returns (int) { return rocketStorage.getInt(_key); } function getBytes32(bytes32 _key) internal view returns (bytes32) { return rocketStorage.getBytes32(_key); } /// @dev Storage set methods function setAddress(bytes32 _key, address _value) internal { rocketStorage.setAddress(_key, _value); } function setUint(bytes32 _key, uint _value) internal { rocketStorage.setUint(_key, _value); } function setString(bytes32 _key, string memory _value) internal { rocketStorage.setString(_key, _value); } function setBytes(bytes32 _key, bytes memory _value) internal { rocketStorage.setBytes(_key, _value); } function setBool(bytes32 _key, bool _value) internal { rocketStorage.setBool(_key, _value); } function setInt(bytes32 _key, int _value) internal { rocketStorage.setInt(_key, _value); } function setBytes32(bytes32 _key, bytes32 _value) internal { rocketStorage.setBytes32(_key, _value); } /// @dev Storage delete methods function deleteAddress(bytes32 _key) internal { rocketStorage.deleteAddress(_key); } function deleteUint(bytes32 _key) internal { rocketStorage.deleteUint(_key); } function deleteString(bytes32 _key) internal { rocketStorage.deleteString(_key); } function deleteBytes(bytes32 _key) internal { rocketStorage.deleteBytes(_key); } function deleteBool(bytes32 _key) internal { rocketStorage.deleteBool(_key); } function deleteInt(bytes32 _key) internal { rocketStorage.deleteInt(_key); } function deleteBytes32(bytes32 _key) internal { rocketStorage.deleteBytes32(_key); } /// @dev Storage arithmetic methods function addUint(bytes32 _key, uint256 _amount) internal { rocketStorage.addUint(_key, _amount); } function subUint(bytes32 _key, uint256 _amount) internal { rocketStorage.subUint(_key, _amount); } }
/** * . * / \ * |.'.| * |'.'| * ,'| |`. * |,-'-|-'-.| * __|_| | _ _ _____ _ * | ___ \| | | | | | ___ \ | | * | |_/ /|__ ___| | _____| |_ | |_/ /__ ___ | | * | // _ \ / __| |/ / _ \ __| | __/ _ \ / _ \| | * | |\ \ (_) | (__| < __/ |_ | | | (_) | (_) | | * \_| \_\___/ \___|_|\_\___|\__| \_| \___/ \___/|_| * +---------------------------------------------------+ * | DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0 | * +---------------------------------------------------+ * * Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned, * decentralised, trustless and compatible with staking in Ethereum 2.0. * * For more information about Rocket Pool, visit https://rocketpool.net * * Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty * */ pragma solidity >0.5.0 <0.9.0; // SPDX-License-Identifier: GPL-3.0-only interface RocketDepositPoolInterface { function getBalance() external view returns (uint256); function getNodeBalance() external view returns (uint256); function getUserBalance() external view returns (int256); function getExcessBalance() external view returns (uint256); function deposit() external payable; function getMaximumDepositAmount() external view returns (uint256); function nodeDeposit(uint256 _totalAmount) external payable; function nodeCreditWithdrawal(uint256 _amount) external; function recycleDissolvedDeposit() external payable; function recycleExcessCollateral() external payable; function recycleLiquidatedStake() external payable; function assignDeposits() external; function maybeAssignDeposits() external returns (bool); function withdrawExcessBalance(uint256 _amount) external; }
/** * . * / \ * |.'.| * |'.'| * ,'| |`. * |,-'-|-'-.| * __|_| | _ _ _____ _ * | ___ \| | | | | | ___ \ | | * | |_/ /|__ ___| | _____| |_ | |_/ /__ ___ | | * | // _ \ / __| |/ / _ \ __| | __/ _ \ / _ \| | * | |\ \ (_) | (__| < __/ |_ | | | (_) | (_) | | * \_| \_\___/ \___|_|\_\___|\__| \_| \___/ \___/|_| * +---------------------------------------------------+ * | DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0 | * +---------------------------------------------------+ * * Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned, * decentralised, trustless and compatible with staking in Ethereum 2.0. * * For more information about Rocket Pool, visit https://rocketpool.net * * Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty * */ pragma solidity 0.7.6; // SPDX-License-Identifier: GPL-3.0-only // Represents the type of deposits required by a minipool enum MinipoolDeposit { None, // Marks an invalid deposit type Full, // The minipool requires 32 ETH from the node operator, 16 ETH of which will be refinanced from user deposits Half, // The minipool required 16 ETH from the node operator to be matched with 16 ETH from user deposits Empty, // The minipool requires 0 ETH from the node operator to be matched with 32 ETH from user deposits (trusted nodes only) Variable // Indicates this minipool is of the new generation that supports a variable deposit amount }
/** * . * / \ * |.'.| * |'.'| * ,'| |`. * |,-'-|-'-.| * __|_| | _ _ _____ _ * | ___ \| | | | | | ___ \ | | * | |_/ /|__ ___| | _____| |_ | |_/ /__ ___ | | * | // _ \ / __| |/ / _ \ __| | __/ _ \ / _ \| | * | |\ \ (_) | (__| < __/ |_ | | | (_) | (_) | | * \_| \_\___/ \___|_|\_\___|\__| \_| \___/ \___/|_| * +---------------------------------------------------+ * | DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0 | * +---------------------------------------------------+ * * Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned, * decentralised, trustless and compatible with staking in Ethereum 2.0. * * For more information about Rocket Pool, visit https://rocketpool.net * * Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty * */ pragma solidity 0.7.6; // SPDX-License-Identifier: GPL-3.0-only // Represents a minipool's status within the network enum MinipoolStatus { Initialised, // The minipool has been initialised and is awaiting a deposit of user ETH Prelaunch, // The minipool has enough ETH to begin staking and is awaiting launch by the node operator Staking, // The minipool is currently staking Withdrawable, // NO LONGER USED Dissolved // The minipool has been dissolved and its user deposited ETH has been returned to the deposit pool }
/** * . * / \ * |.'.| * |'.'| * ,'| |`. * |,-'-|-'-.| * __|_| | _ _ _____ _ * | ___ \| | | | | | ___ \ | | * | |_/ /|__ ___| | _____| |_ | |_/ /__ ___ | | * | // _ \ / __| |/ / _ \ __| | __/ _ \ / _ \| | * | |\ \ (_) | (__| < __/ |_ | | | (_) | (_) | | * \_| \_\___/ \___|_|\_\___|\__| \_| \___/ \___/|_| * +---------------------------------------------------+ * | DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0 | * +---------------------------------------------------+ * * Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned, * decentralised, trustless and compatible with staking in Ethereum 2.0. * * For more information about Rocket Pool, visit https://rocketpool.net * * Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty * */ pragma solidity >0.5.0 <0.9.0; // SPDX-License-Identifier: GPL-3.0-only import "../../types/MinipoolDeposit.sol"; import "../../types/MinipoolStatus.sol"; import "../RocketStorageInterface.sol"; interface RocketMinipoolInterface { function version() external view returns (uint8); function initialise(address _nodeAddress) external; function getStatus() external view returns (MinipoolStatus); function getFinalised() external view returns (bool); function getStatusBlock() external view returns (uint256); function getStatusTime() external view returns (uint256); function getScrubVoted(address _member) external view returns (bool); function getDepositType() external view returns (MinipoolDeposit); function getNodeAddress() external view returns (address); function getNodeFee() external view returns (uint256); function getNodeDepositBalance() external view returns (uint256); function getNodeRefundBalance() external view returns (uint256); function getNodeDepositAssigned() external view returns (bool); function getPreLaunchValue() external view returns (uint256); function getNodeTopUpValue() external view returns (uint256); function getVacant() external view returns (bool); function getPreMigrationBalance() external view returns (uint256); function getUserDistributed() external view returns (bool); function getUserDepositBalance() external view returns (uint256); function getUserDepositAssigned() external view returns (bool); function getUserDepositAssignedTime() external view returns (uint256); function getTotalScrubVotes() external view returns (uint256); function calculateNodeShare(uint256 _balance) external view returns (uint256); function calculateUserShare(uint256 _balance) external view returns (uint256); function preDeposit(uint256 _bondingValue, bytes calldata _validatorPubkey, bytes calldata _validatorSignature, bytes32 _depositDataRoot) external payable; function deposit() external payable; function userDeposit() external payable; function distributeBalance(bool _rewardsOnly) external; function beginUserDistribute() external; function userDistributeAllowed() external view returns (bool); function refund() external; function slash() external; function finalise() external; function canStake() external view returns (bool); function canPromote() external view returns (bool); function stake(bytes calldata _validatorSignature, bytes32 _depositDataRoot) external; function prepareVacancy(uint256 _bondAmount, uint256 _currentBalance) external; function promote() external; function dissolve() external; function close() external; function voteScrub() external; function reduceBondAmount() external; }
/** * . * / \ * |.'.| * |'.'| * ,'| |`. * |,-'-|-'-.| * __|_| | _ _ _____ _ * | ___ \| | | | | | ___ \ | | * | |_/ /|__ ___| | _____| |_ | |_/ /__ ___ | | * | // _ \ / __| |/ / _ \ __| | __/ _ \ / _ \| | * | |\ \ (_) | (__| < __/ |_ | | | (_) | (_) | | * \_| \_\___/ \___|_|\_\___|\__| \_| \___/ \___/|_| * +---------------------------------------------------+ * | DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0 | * +---------------------------------------------------+ * * Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned, * decentralised, trustless and compatible with staking in Ethereum 2.0. * * For more information about Rocket Pool, visit https://rocketpool.net * * Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty * */ pragma solidity 0.7.6; // SPDX-License-Identifier: GPL-3.0-only import "./MinipoolDeposit.sol"; import "./MinipoolStatus.sol"; // A struct containing all the information on-chain about a specific minipool struct MinipoolDetails { bool exists; address minipoolAddress; bytes pubkey; MinipoolStatus status; uint256 statusBlock; uint256 statusTime; bool finalised; MinipoolDeposit depositType; uint256 nodeFee; uint256 nodeDepositBalance; bool nodeDepositAssigned; uint256 userDepositBalance; bool userDepositAssigned; uint256 userDepositAssignedTime; bool useLatestDelegate; address delegate; address previousDelegate; address effectiveDelegate; uint256 penaltyCount; uint256 penaltyRate; address nodeAddress; }
/** * . * / \ * |.'.| * |'.'| * ,'| |`. * |,-'-|-'-.| * __|_| | _ _ _____ _ * | ___ \| | | | | | ___ \ | | * | |_/ /|__ ___| | _____| |_ | |_/ /__ ___ | | * | // _ \ / __| |/ / _ \ __| | __/ _ \ / _ \| | * | |\ \ (_) | (__| < __/ |_ | | | (_) | (_) | | * \_| \_\___/ \___|_|\_\___|\__| \_| \___/ \___/|_| * +---------------------------------------------------+ * | DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0 | * +---------------------------------------------------+ * * Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned, * decentralised, trustless and compatible with staking in Ethereum 2.0. * * For more information about Rocket Pool, visit https://rocketpool.net * * Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty * */ pragma solidity >0.5.0 <0.9.0; pragma abicoder v2; // SPDX-License-Identifier: GPL-3.0-only import "../../types/MinipoolDeposit.sol"; import "../../types/MinipoolDetails.sol"; import "./RocketMinipoolInterface.sol"; interface RocketMinipoolManagerInterface { function getMinipoolCount() external view returns (uint256); function getStakingMinipoolCount() external view returns (uint256); function getFinalisedMinipoolCount() external view returns (uint256); function getActiveMinipoolCount() external view returns (uint256); function getMinipoolRPLSlashed(address _minipoolAddress) external view returns (bool); function getMinipoolCountPerStatus(uint256 offset, uint256 limit) external view returns (uint256, uint256, uint256, uint256, uint256); function getPrelaunchMinipools(uint256 offset, uint256 limit) external view returns (address[] memory); function getMinipoolAt(uint256 _index) external view returns (address); function getNodeMinipoolCount(address _nodeAddress) external view returns (uint256); function getNodeActiveMinipoolCount(address _nodeAddress) external view returns (uint256); function getNodeFinalisedMinipoolCount(address _nodeAddress) external view returns (uint256); function getNodeStakingMinipoolCount(address _nodeAddress) external view returns (uint256); function getNodeStakingMinipoolCountBySize(address _nodeAddress, uint256 _depositSize) external view returns (uint256); function getNodeMinipoolAt(address _nodeAddress, uint256 _index) external view returns (address); function getNodeValidatingMinipoolCount(address _nodeAddress) external view returns (uint256); function getNodeValidatingMinipoolAt(address _nodeAddress, uint256 _index) external view returns (address); function getMinipoolByPubkey(bytes calldata _pubkey) external view returns (address); function getMinipoolExists(address _minipoolAddress) external view returns (bool); function getMinipoolDestroyed(address _minipoolAddress) external view returns (bool); function getMinipoolPubkey(address _minipoolAddress) external view returns (bytes memory); function updateNodeStakingMinipoolCount(uint256 _previousBond, uint256 _newBond, uint256 _previousFee, uint256 _newFee) external; function getMinipoolWithdrawalCredentials(address _minipoolAddress) external pure returns (bytes memory); function createMinipool(address _nodeAddress, uint256 _salt) external returns (RocketMinipoolInterface); function createVacantMinipool(address _nodeAddress, uint256 _salt, bytes calldata _validatorPubkey, uint256 _bondAmount, uint256 _currentBalance) external returns (RocketMinipoolInterface); function removeVacantMinipool() external; function getVacantMinipoolCount() external view returns (uint256); function getVacantMinipoolAt(uint256 _index) external view returns (address); function destroyMinipool() external; function incrementNodeStakingMinipoolCount(address _nodeAddress) external; function decrementNodeStakingMinipoolCount(address _nodeAddress) external; function incrementNodeFinalisedMinipoolCount(address _nodeAddress) external; function setMinipoolPubkey(bytes calldata _pubkey) external; function getMinipoolDepositType(address _minipoolAddress) external view returns (MinipoolDeposit); }
/** * . * / \ * |.'.| * |'.'| * ,'| |`. * |,-'-|-'-.| * __|_| | _ _ _____ _ * | ___ \| | | | | | ___ \ | | * | |_/ /|__ ___| | _____| |_ | |_/ /__ ___ | | * | // _ \ / __| |/ / _ \ __| | __/ _ \ / _ \| | * | |\ \ (_) | (__| < __/ |_ | | | (_) | (_) | | * \_| \_\___/ \___|_|\_\___|\__| \_| \___/ \___/|_| * +---------------------------------------------------+ * | DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0 | * +---------------------------------------------------+ * * Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned, * decentralised, trustless and compatible with staking in Ethereum 2.0. * * For more information about Rocket Pool, visit https://rocketpool.net * * Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty * */ pragma solidity >0.5.0 <0.9.0; // SPDX-License-Identifier: GPL-3.0-only import "../../types/MinipoolDeposit.sol"; interface RocketMinipoolQueueInterface { function getTotalLength() external view returns (uint256); function getContainsLegacy() external view returns (bool); function getLengthLegacy(MinipoolDeposit _depositType) external view returns (uint256); function getLength() external view returns (uint256); function getTotalCapacity() external view returns (uint256); function getEffectiveCapacity() external view returns (uint256); function getNextCapacityLegacy() external view returns (uint256); function getNextDepositLegacy() external view returns (MinipoolDeposit, uint256); function enqueueMinipool(address _minipool) external; function dequeueMinipoolByDepositLegacy(MinipoolDeposit _depositType) external returns (address minipoolAddress); function dequeueMinipools(uint256 _maxToDequeue) external returns (address[] memory minipoolAddress); function removeMinipool(MinipoolDeposit _depositType) external; function getMinipoolAt(uint256 _index) external view returns(address); function getMinipoolPosition(address _minipool) external view returns (int256); }
/** * . * / \ * |.'.| * |'.'| * ,'| |`. * |,-'-|-'-.| * __|_| | _ _ _____ _ * | ___ \| | | | | | ___ \ | | * | |_/ /|__ ___| | _____| |_ | |_/ /__ ___ | | * | // _ \ / __| |/ / _ \ __| | __/ _ \ / _ \| | * | |\ \ (_) | (__| < __/ |_ | | | (_) | (_) | | * \_| \_\___/ \___|_|\_\___|\__| \_| \___/ \___/|_| * +---------------------------------------------------+ * | DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0 | * +---------------------------------------------------+ * * Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned, * decentralised, trustless and compatible with staking in Ethereum 2.0. * * For more information about Rocket Pool, visit https://rocketpool.net * * Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty * */ pragma solidity >0.5.0 <0.9.0; // SPDX-License-Identifier: GPL-3.0-only interface RocketNetworkFeesInterface { function getNodeDemand() external view returns (int256); function getNodeFee() external view returns (uint256); function getNodeFeeByDemand(int256 _nodeDemand) external view returns (uint256); }
/** * . * / \ * |.'.| * |'.'| * ,'| |`. * |,-'-|-'-.| * __|_| | _ _ _____ _ * | ___ \| | | | | | ___ \ | | * | |_/ /|__ ___| | _____| |_ | |_/ /__ ___ | | * | // _ \ / __| |/ / _ \ __| | __/ _ \ / _ \| | * | |\ \ (_) | (__| < __/ |_ | | | (_) | (_) | | * \_| \_\___/ \___|_|\_\___|\__| \_| \___/ \___/|_| * +---------------------------------------------------+ * | DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0 | * +---------------------------------------------------+ * * Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned, * decentralised, trustless and compatible with staking in Ethereum 2.0. * * For more information about Rocket Pool, visit https://rocketpool.net * * Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty * */ pragma solidity >0.5.0 <0.9.0; // SPDX-License-Identifier: GPL-3.0-only import "../../types/MinipoolDeposit.sol"; interface RocketNodeDepositInterface { function getNodeDepositCredit(address _nodeOperator) external view returns (uint256); function increaseDepositCreditBalance(address _nodeOperator, uint256 _amount) external; function deposit(uint256 _depositAmount, uint256 _minimumNodeFee, bytes calldata _validatorPubkey, bytes calldata _validatorSignature, bytes32 _depositDataRoot, uint256 _salt, address _expectedMinipoolAddress) external payable; function depositWithCredit(uint256 _depositAmount, uint256 _minimumNodeFee, bytes calldata _validatorPubkey, bytes calldata _validatorSignature, bytes32 _depositDataRoot, uint256 _salt, address _expectedMinipoolAddress) external payable; function isValidDepositAmount(uint256 _amount) external pure returns (bool); function getDepositAmounts() external pure returns (uint256[] memory); function createVacantMinipool(uint256 _bondAmount, uint256 _minimumNodeFee, bytes calldata _validatorPubkey, uint256 _salt, address _expectedMinipoolAddress, uint256 _currentBalance) external; function increaseEthMatched(address _nodeAddress, uint256 _amount) external; }
/** * . * / \ * |.'.| * |'.'| * ,'| |`. * |,-'-|-'-.| * __|_| | _ _ _____ _ * | ___ \| | | | | | ___ \ | | * | |_/ /|__ ___| | _____| |_ | |_/ /__ ___ | | * | // _ \ / __| |/ / _ \ __| | __/ _ \ / _ \| | * | |\ \ (_) | (__| < __/ |_ | | | (_) | (_) | | * \_| \_\___/ \___|_|\_\___|\__| \_| \___/ \___/|_| * +---------------------------------------------------+ * | DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0 | * +---------------------------------------------------+ * * Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned, * decentralised, trustless and compatible with staking in Ethereum 2.0. * * For more information about Rocket Pool, visit https://rocketpool.net * * Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty * */ pragma solidity >0.5.0 <0.9.0; // SPDX-License-Identifier: GPL-3.0-only interface RocketDAOProtocolSettingsDepositInterface { function getDepositEnabled() external view returns (bool); function getAssignDepositsEnabled() external view returns (bool); function getMinimumDeposit() external view returns (uint256); function getMaximumDepositPoolSize() external view returns (uint256); function getMaximumDepositAssignments() external view returns (uint256); function getMaximumDepositSocialisedAssignments() external view returns (uint256); function getDepositFee() external view returns (uint256); }
/** * . * / \ * |.'.| * |'.'| * ,'| |`. * |,-'-|-'-.| * __|_| | _ _ _____ _ * | ___ \| | | | | | ___ \ | | * | |_/ /|__ ___| | _____| |_ | |_/ /__ ___ | | * | // _ \ / __| |/ / _ \ __| | __/ _ \ / _ \| | * | |\ \ (_) | (__| < __/ |_ | | | (_) | (_) | | * \_| \_\___/ \___|_|\_\___|\__| \_| \___/ \___/|_| * +---------------------------------------------------+ * | DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0 | * +---------------------------------------------------+ * * Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned, * decentralised, trustless and compatible with staking in Ethereum 2.0. * * For more information about Rocket Pool, visit https://rocketpool.net * * Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty * */ pragma solidity >0.5.0 <0.9.0; // SPDX-License-Identifier: GPL-3.0-only import "../../../../types/MinipoolDeposit.sol"; interface RocketDAOProtocolSettingsMinipoolInterface { function getLaunchBalance() external view returns (uint256); function getPreLaunchValue() external pure returns (uint256); function getDepositUserAmount(MinipoolDeposit _depositType) external view returns (uint256); function getFullDepositUserAmount() external view returns (uint256); function getHalfDepositUserAmount() external view returns (uint256); function getVariableDepositAmount() external view returns (uint256); function getSubmitWithdrawableEnabled() external view returns (bool); function getBondReductionEnabled() external view returns (bool); function getLaunchTimeout() external view returns (uint256); function getMaximumCount() external view returns (uint256); function isWithinUserDistributeWindow(uint256 _time) external view returns (bool); function hasUserDistributeWindowPassed(uint256 _time) external view returns (bool); function getUserDistributeWindowStart() external view returns (uint256); function getUserDistributeWindowLength() external view returns (uint256); }
/** * . * / \ * |.'.| * |'.'| * ,'| |`. * |,-'-|-'-.| * __|_| | _ _ _____ _ * | ___ \| | | | | | ___ \ | | * | |_/ /|__ ___| | _____| |_ | |_/ /__ ___ | | * | // _ \ / __| |/ / _ \ __| | __/ _ \ / _ \| | * | |\ \ (_) | (__| < __/ |_ | | | (_) | (_) | | * \_| \_\___/ \___|_|\_\___|\__| \_| \___/ \___/|_| * +---------------------------------------------------+ * | DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0 | * +---------------------------------------------------+ * * Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned, * decentralised, trustless and compatible with staking in Ethereum 2.0. * * For more information about Rocket Pool, visit https://rocketpool.net * * Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty * */ pragma solidity >0.5.0 <0.9.0; // SPDX-License-Identifier: GPL-3.0-only interface RocketDAOProtocolSettingsNodeInterface { function getRegistrationEnabled() external view returns (bool); function getSmoothingPoolRegistrationEnabled() external view returns (bool); function getDepositEnabled() external view returns (bool); function getVacantMinipoolsEnabled() external view returns (bool); function getMinimumPerMinipoolStake() external view returns (uint256); function getMaximumPerMinipoolStake() external view returns (uint256); }
/** * . * / \ * |.'.| * |'.'| * ,'| |`. * |,-'-|-'-.| * __|_| | _ _ _____ _ * | ___ \| | | | | | ___ \ | | * | |_/ /|__ ___| | _____| |_ | |_/ /__ ___ | | * | // _ \ / __| |/ / _ \ __| | __/ _ \ / _ \| | * | |\ \ (_) | (__| < __/ |_ | | | (_) | (_) | | * \_| \_\___/ \___|_|\_\___|\__| \_| \___/ \___/|_| * +---------------------------------------------------+ * | DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0 | * +---------------------------------------------------+ * * Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned, * decentralised, trustless and compatible with staking in Ethereum 2.0. * * For more information about Rocket Pool, visit https://rocketpool.net * * Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty * */ pragma solidity >0.5.0 <0.9.0; // SPDX-License-Identifier: GPL-3.0-only interface RocketDAOProtocolSettingsNetworkInterface { function getNodeConsensusThreshold() external view returns (uint256); function getNodePenaltyThreshold() external view returns (uint256); function getPerPenaltyRate() external view returns (uint256); function getSubmitBalancesEnabled() external view returns (bool); function getSubmitBalancesFrequency() external view returns (uint256); function getSubmitPricesEnabled() external view returns (bool); function getSubmitPricesFrequency() external view returns (uint256); function getMinimumNodeFee() external view returns (uint256); function getTargetNodeFee() external view returns (uint256); function getMaximumNodeFee() external view returns (uint256); function getNodeFeeDemandRange() external view returns (uint256); function getTargetRethCollateralRate() external view returns (uint256); function getRethDepositDelay() external view returns (uint256); function getSubmitRewardsEnabled() external view returns (bool); }
/** * . * / \ * |.'.| * |'.'| * ,'| |`. * |,-'-|-'-.| * __|_| | _ _ _____ _ * | ___ \| | | | | | ___ \ | | * | |_/ /|__ ___| | _____| |_ | |_/ /__ ___ | | * | // _ \ / __| |/ / _ \ __| | __/ _ \ / _ \| | * | |\ \ (_) | (__| < __/ |_ | | | (_) | (_) | | * \_| \_\___/ \___|_|\_\___|\__| \_| \___/ \___/|_| * +---------------------------------------------------+ * | DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0 | * +---------------------------------------------------+ * * Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned, * decentralised, trustless and compatible with staking in Ethereum 2.0. * * For more information about Rocket Pool, visit https://rocketpool.net * * Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty * */ pragma solidity >0.5.0 <0.9.0; // SPDX-License-Identifier: GPL-3.0-only interface RocketDAONodeTrustedInterface { function getBootstrapModeDisabled() external view returns (bool); function getMemberQuorumVotesRequired() external view returns (uint256); function getMemberAt(uint256 _index) external view returns (address); function getMemberCount() external view returns (uint256); function getMemberMinRequired() external view returns (uint256); function getMemberIsValid(address _nodeAddress) external view returns (bool); function getMemberLastProposalTime(address _nodeAddress) external view returns (uint256); function getMemberID(address _nodeAddress) external view returns (string memory); function getMemberUrl(address _nodeAddress) external view returns (string memory); function getMemberJoinedTime(address _nodeAddress) external view returns (uint256); function getMemberProposalExecutedTime(string memory _proposalType, address _nodeAddress) external view returns (uint256); function getMemberRPLBondAmount(address _nodeAddress) external view returns (uint256); function getMemberIsChallenged(address _nodeAddress) external view returns (bool); function getMemberUnbondedValidatorCount(address _nodeAddress) external view returns (uint256); function incrementMemberUnbondedValidatorCount(address _nodeAddress) external; function decrementMemberUnbondedValidatorCount(address _nodeAddress) external; function bootstrapMember(string memory _id, string memory _url, address _nodeAddress) external; function bootstrapSettingUint(string memory _settingContractName, string memory _settingPath, uint256 _value) external; function bootstrapSettingBool(string memory _settingContractName, string memory _settingPath, bool _value) external; function bootstrapUpgrade(string memory _type, string memory _name, string memory _contractAbi, address _contractAddress) external; function bootstrapDisable(bool _confirmDisableBootstrapMode) external; function memberJoinRequired(string memory _id, string memory _url) external; }
/** * . * / \ * |.'.| * |'.'| * ,'| |`. * |,-'-|-'-.| * __|_| | _ _ _____ _ * | ___ \| | | | | | ___ \ | | * | |_/ /|__ ___| | _____| |_ | |_/ /__ ___ | | * | // _ \ / __| |/ / _ \ __| | __/ _ \ / _ \| | * | |\ \ (_) | (__| < __/ |_ | | | (_) | (_) | | * \_| \_\___/ \___|_|\_\___|\__| \_| \___/ \___/|_| * +---------------------------------------------------+ * | DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0 | * +---------------------------------------------------+ * * Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned, * decentralised, trustless and compatible with staking in Ethereum 2.0. * * For more information about Rocket Pool, visit https://rocketpool.net * * Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty * */ pragma solidity >0.5.0 <0.9.0; // SPDX-License-Identifier: GPL-3.0-only interface RocketDAONodeTrustedSettingsMembersInterface { function getQuorum() external view returns (uint256); function getRPLBond() external view returns(uint256); function getMinipoolUnbondedMax() external view returns(uint256); function getMinipoolUnbondedMinFee() external view returns(uint256); function getChallengeCooldown() external view returns(uint256); function getChallengeWindow() external view returns(uint256); function getChallengeCost() external view returns(uint256); }
/** * . * / \ * |.'.| * |'.'| * ,'| |`. * |,-'-|-'-.| * __|_| | _ _ _____ _ * | ___ \| | | | | | ___ \ | | * | |_/ /|__ ___| | _____| |_ | |_/ /__ ___ | | * | // _ \ / __| |/ / _ \ __| | __/ _ \ / _ \| | * | |\ \ (_) | (__| < __/ |_ | | | (_) | (_) | | * \_| \_\___/ \___|_|\_\___|\__| \_| \___/ \___/|_| * +---------------------------------------------------+ * | DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0 | * +---------------------------------------------------+ * * Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned, * decentralised, trustless and compatible with staking in Ethereum 2.0. * * For more information about Rocket Pool, visit https://rocketpool.net * * Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty * */ pragma solidity 0.7.6; // SPDX-License-Identifier: GPL-3.0-only // A struct containing all the information on-chain about a specific node struct NodeDetails { bool exists; uint256 registrationTime; string timezoneLocation; bool feeDistributorInitialised; address feeDistributorAddress; uint256 rewardNetwork; uint256 rplStake; uint256 effectiveRPLStake; uint256 minimumRPLStake; uint256 maximumRPLStake; uint256 ethMatched; uint256 ethMatchedLimit; uint256 minipoolCount; uint256 balanceETH; uint256 balanceRETH; uint256 balanceRPL; uint256 balanceOldRPL; uint256 depositCreditBalance; uint256 distributorBalanceUserETH; uint256 distributorBalanceNodeETH; address withdrawalAddress; address pendingWithdrawalAddress; bool smoothingPoolRegistrationState; uint256 smoothingPoolRegistrationChanged; address nodeAddress; }
/** * . * / \ * |.'.| * |'.'| * ,'| |`. * |,-'-|-'-.| * __|_| | _ _ _____ _ * | ___ \| | | | | | ___ \ | | * | |_/ /|__ ___| | _____| |_ | |_/ /__ ___ | | * | // _ \ / __| |/ / _ \ __| | __/ _ \ / _ \| | * | |\ \ (_) | (__| < __/ |_ | | | (_) | (_) | | * \_| \_\___/ \___|_|\_\___|\__| \_| \___/ \___/|_| * +---------------------------------------------------+ * | DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0 | * +---------------------------------------------------+ * * Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned, * decentralised, trustless and compatible with staking in Ethereum 2.0. * * For more information about Rocket Pool, visit https://rocketpool.net * * Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty * */ pragma solidity >0.5.0 <0.9.0; pragma abicoder v2; // SPDX-License-Identifier: GPL-3.0-only import "../../types/NodeDetails.sol"; interface RocketNodeManagerInterface { // Structs struct TimezoneCount { string timezone; uint256 count; } function getNodeCount() external view returns (uint256); function getNodeCountPerTimezone(uint256 offset, uint256 limit) external view returns (TimezoneCount[] memory); function getNodeAt(uint256 _index) external view returns (address); function getNodeExists(address _nodeAddress) external view returns (bool); function getNodeWithdrawalAddress(address _nodeAddress) external view returns (address); function getNodePendingWithdrawalAddress(address _nodeAddress) external view returns (address); function getNodeTimezoneLocation(address _nodeAddress) external view returns (string memory); function registerNode(string calldata _timezoneLocation) external; function getNodeRegistrationTime(address _nodeAddress) external view returns (uint256); function setTimezoneLocation(string calldata _timezoneLocation) external; function setRewardNetwork(address _nodeAddress, uint256 network) external; function getRewardNetwork(address _nodeAddress) external view returns (uint256); function getFeeDistributorInitialised(address _nodeAddress) external view returns (bool); function initialiseFeeDistributor() external; function getAverageNodeFee(address _nodeAddress) external view returns (uint256); function setSmoothingPoolRegistrationState(bool _state) external; function getSmoothingPoolRegistrationState(address _nodeAddress) external returns (bool); function getSmoothingPoolRegistrationChanged(address _nodeAddress) external returns (uint256); function getSmoothingPoolRegisteredNodeCount(uint256 _offset, uint256 _limit) external view returns (uint256); function getNodeDetails(address _nodeAddress) external view returns (NodeDetails memory); function getNodeAddresses(uint256 _offset, uint256 _limit) external view returns (address[] memory); }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @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); }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /* * @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 GSN 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 payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../../utils/Context.sol"; import "./IERC20.sol"; import "../../math/SafeMath.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin guidelines: functions revert instead * of returning `false` on failure. This behavior is nonetheless conventional * and does not conflict with the expectations of ERC20 applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; /** * @dev Sets the values for {name} and {symbol}, initializes {decimals} with * a default value of 18. * * To select a different value for {decimals}, use {_setupDecimals}. * * All three of these values are immutable: they can only be set once during * construction. */ constructor (string memory name_, string memory symbol_) public { _name = name_; _symbol = symbol_; _decimals = 18; } /** * @dev Returns the name of the token. */ function name() public view virtual returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is * called. * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual returns (uint8) { return _decimals; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } /** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `to` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Sets {decimals} to a value other than the default one of 18. * * WARNING: This function should only be called from the constructor. Most * applications that interact with token contracts will not expect * {decimals} to ever change, and may work incorrectly if it does. */ function _setupDecimals(uint8 decimals_) internal virtual { _decimals = decimals_; } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be to transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../../utils/Context.sol"; import "./ERC20.sol"; /** * @dev Extension of {ERC20} that allows token holders to destroy both their own * tokens and those that they have an allowance for, in a way that can be * recognized off-chain (via event analysis). */ abstract contract ERC20Burnable is Context, ERC20 { using SafeMath for uint256; /** * @dev Destroys `amount` tokens from the caller. * * See {ERC20-_burn}. */ function burn(uint256 amount) public virtual { _burn(_msgSender(), amount); } /** * @dev Destroys `amount` tokens from `account`, deducting from the caller's * allowance. * * See {ERC20-_burn} and {ERC20-allowance}. * * Requirements: * * - the caller must have allowance for ``accounts``'s tokens of at least * `amount`. */ function burnFrom(address account, uint256 amount) public virtual { uint256 decreasedAllowance = allowance(account, _msgSender()).sub(amount, "ERC20: burn amount exceeds allowance"); _approve(account, _msgSender(), decreasedAllowance); _burn(account, amount); } }
/** * . * / \ * |.'.| * |'.'| * ,'| |`. * |,-'-|-'-.| * __|_| | _ _ _____ _ * | ___ \| | | | | | ___ \ | | * | |_/ /|__ ___| | _____| |_ | |_/ /__ ___ | | * | // _ \ / __| |/ / _ \ __| | __/ _ \ / _ \| | * | |\ \ (_) | (__| < __/ |_ | | | (_) | (_) | | * \_| \_\___/ \___|_|\_\___|\__| \_| \___/ \___/|_| * +---------------------------------------------------+ * | DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0 | * +---------------------------------------------------+ * * Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned, * decentralised, trustless and compatible with staking in Ethereum 2.0. * * For more information about Rocket Pool, visit https://rocketpool.net * * Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty * */ pragma solidity >0.5.0 <0.9.0; // SPDX-License-Identifier: GPL-3.0-only import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol"; interface RocketVaultInterface { function balanceOf(string memory _networkContractName) external view returns (uint256); function depositEther() external payable; function withdrawEther(uint256 _amount) external; function depositToken(string memory _networkContractName, IERC20 _tokenAddress, uint256 _amount) external; function withdrawToken(address _withdrawalAddress, IERC20 _tokenAddress, uint256 _amount) external; function balanceOfToken(string memory _networkContractName, IERC20 _tokenAddress) external view returns (uint256); function transferToken(string memory _networkContractName, IERC20 _tokenAddress, uint256 _amount) external; function burnToken(ERC20Burnable _tokenAddress, uint256 _amount) external; }
/** * . * / \ * |.'.| * |'.'| * ,'| |`. * |,-'-|-'-.| * __|_| | _ _ _____ _ * | ___ \| | | | | | ___ \ | | * | |_/ /|__ ___| | _____| |_ | |_/ /__ ___ | | * | // _ \ / __| |/ / _ \ __| | __/ _ \ / _ \| | * | |\ \ (_) | (__| < __/ |_ | | | (_) | (_) | | * \_| \_\___/ \___|_|\_\___|\__| \_| \___/ \___/|_| * +---------------------------------------------------+ * | DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0 | * +---------------------------------------------------+ * * Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned, * decentralised, trustless and compatible with staking in Ethereum 2.0. * * For more information about Rocket Pool, visit https://rocketpool.net * * Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty * */ pragma solidity >0.5.0 <0.9.0; // SPDX-License-Identifier: GPL-3.0-only interface RocketNodeStakingInterface { function getTotalRPLStake() external view returns (uint256); function getNodeRPLStake(address _nodeAddress) external view returns (uint256); function getNodeETHMatched(address _nodeAddress) external view returns (uint256); function getNodeETHProvided(address _nodeAddress) external view returns (uint256); function getNodeETHCollateralisationRatio(address _nodeAddress) external view returns (uint256); function getNodeRPLStakedTime(address _nodeAddress) external view returns (uint256); function getNodeEffectiveRPLStake(address _nodeAddress) external view returns (uint256); function getNodeMinimumRPLStake(address _nodeAddress) external view returns (uint256); function getNodeMaximumRPLStake(address _nodeAddress) external view returns (uint256); function getNodeETHMatchedLimit(address _nodeAddress) external view returns (uint256); function stakeRPL(uint256 _amount) external; function stakeRPLFor(address _nodeAddress, uint256 _amount) external; function setStakeRPLForAllowed(address _caller, bool _allowed) external; function withdrawRPL(uint256 _amount) external; function slashRPL(address _nodeAddress, uint256 _ethSlashAmount) external; }
{ "optimizer": { "enabled": true, "runs": 15000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
[{"inputs":[{"internalType":"contract RocketStorageInterface","name":"_rocketStorageAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"DepositReceived","type":"event"},{"inputs":[{"internalType":"uint256","name":"_bondAmount","type":"uint256"},{"internalType":"uint256","name":"_minimumNodeFee","type":"uint256"},{"internalType":"bytes","name":"_validatorPubkey","type":"bytes"},{"internalType":"uint256","name":"_salt","type":"uint256"},{"internalType":"address","name":"_expectedMinipoolAddress","type":"address"},{"internalType":"uint256","name":"_currentBalance","type":"uint256"}],"name":"createVacantMinipool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_bondAmount","type":"uint256"},{"internalType":"uint256","name":"_minimumNodeFee","type":"uint256"},{"internalType":"bytes","name":"_validatorPubkey","type":"bytes"},{"internalType":"bytes","name":"_validatorSignature","type":"bytes"},{"internalType":"bytes32","name":"_depositDataRoot","type":"bytes32"},{"internalType":"uint256","name":"_salt","type":"uint256"},{"internalType":"address","name":"_expectedMinipoolAddress","type":"address"}],"name":"deposit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_bondAmount","type":"uint256"},{"internalType":"uint256","name":"_minimumNodeFee","type":"uint256"},{"internalType":"bytes","name":"_validatorPubkey","type":"bytes"},{"internalType":"bytes","name":"_validatorSignature","type":"bytes"},{"internalType":"bytes32","name":"_depositDataRoot","type":"bytes32"},{"internalType":"uint256","name":"_salt","type":"uint256"},{"internalType":"address","name":"_expectedMinipoolAddress","type":"address"}],"name":"depositWithCredit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"getDepositAmounts","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeOperator","type":"address"}],"name":"getNodeDepositCredit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeOperator","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"increaseDepositCreditBalance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"increaseEthMatched","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"isValidDepositAmount","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
608060405260008054610100600160a81b031916905534801561002157600080fd5b50604051612d54380380612d548339818101604052602081101561004457600080fd5b50516000805460ff196001600160a01b0390931661010002610100600160a81b031990911617919091166003179055612cd2806100826000396000f3fe60806040526004361061009a5760003560e01c8063643ff9fe116100695780639bed5a451161004e5780639bed5a451461049a578063aa5c9374146104ff578063f5746ee014610545576101f7565b8063643ff9fe146103a957806398913c8d146103ef576101f7565b8063300d9d99146101fc578063493c94671461023a57806354fd4d501461028c578063598d90c5146102b7576101f7565b366101f7576040518060400160405280601181526020017f726f636b65744465706f736974506f6f6c000000000000000000000000000000815250336101748260405160200180807f636f6e74726163742e616464726573730000000000000000000000000000000081525060100182805190602001908083835b602083106101345780518252601f199092019160209182019101610115565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405280519060200120610635565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146101f3576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b5050005b600080fd5b34801561020857600080fd5b506102266004803603602081101561021f57600080fd5b50356106db565b604080519115158252519081900360200190f35b34801561024657600080fd5b5061027a6004803603602081101561025d57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610700565b60408051918252519081900360200190f35b34801561029857600080fd5b506102a1610772565b6040805160ff9092168252519081900360200190f35b6103a7600480360360e08110156102cd57600080fd5b8135916020810135918101906060810160408201356401000000008111156102f457600080fd5b82018360208201111561030657600080fd5b8035906020019184600183028401116401000000008311171561032857600080fd5b91939092909160208101903564010000000081111561034657600080fd5b82018360208201111561035857600080fd5b8035906020019184600183028401116401000000008311171561037a57600080fd5b91935091508035906020810135906040013573ffffffffffffffffffffffffffffffffffffffff1661077b565b005b3480156103b557600080fd5b506103a7600480360360408110156103cc57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356109ab565b3480156103fb57600080fd5b506103a7600480360360c081101561041257600080fd5b81359160208101359181019060608101604082013564010000000081111561043957600080fd5b82018360208201111561044b57600080fd5b8035906020019184600183028401116401000000008311171561046d57600080fd5b919350915080359073ffffffffffffffffffffffffffffffffffffffff6020820135169060400135610c24565b3480156104a657600080fd5b506104af610f1f565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156104eb5781810151838201526020016104d3565b505050509050019250505060405180910390f35b34801561050b57600080fd5b506103a76004803603604081101561052257600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610f8c565b6103a7600480360360e081101561055b57600080fd5b81359160208101359181019060608101604082013564010000000081111561058257600080fd5b82018360208201111561059457600080fd5b803590602001918460018302840111640100000000831117156105b657600080fd5b9193909290916020810190356401000000008111156105d457600080fd5b8201836020820111156105e657600080fd5b8035906020019184600183028401116401000000008311171561060857600080fd5b91935091508035906020810135906040013573ffffffffffffffffffffffffffffffffffffffff1661113b565b60008060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166321f8a721836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156106a957600080fd5b505afa1580156106bd573d6000803e3d6000fd5b505050506040513d60208110156106d357600080fd5b505192915050565b60008167de0b6b3a7640000014806106fa575081676f05b59d3b200000145b92915050565b60006106fa8260405160200180807f6e6f64652e6465706f7369742e6372656469742e62616c616e63650000000000815250601b018273ffffffffffffffffffffffffffffffffffffffff1660601b81526014019150506040516020818303038152906040528051906020012061148a565b60005460ff1681565b6040518060400160405280601181526020017f726f636b65744e6f64654465706f7369740000000000000000000000000000008152503061080f8260405160200180807f636f6e74726163742e61646472657373000000000000000000000000000000008152506010018280519060200190808383602083106101345780518252601f199092019160209182019101610115565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461088e576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b604080517f6e6f64652e65786973747300000000000000000000000000000000000000000060208083019190915233606081901b602b8401528351601f818503018152603f90930190935281519101206108e7906114fe565b610938576040805162461bcd60e51b815260206004820152600c60248201527f496e76616c6964206e6f64650000000000000000000000000000000000000000604482015290519081900360640190fd5b8b341461098c576040805162461bcd60e51b815260206004820152600d60248201527f496e76616c69642076616c756500000000000000000000000000000000000000604482015290519081900360640190fd5b61099d8c8c8c8c8c8c8c8c8c611572565b505050505050505050505050565b6040518060400160405280601181526020017f726f636b65744e6f64654465706f73697400000000000000000000000000000081525030610a3f8260405160200180807f636f6e74726163742e61646472657373000000000000000000000000000000008152506010018280519060200190808383602083106101345780518252601f199092019160209182019101610115565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610abe576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b604080517f6d696e69706f6f6c2e65786973747300000000000000000000000000000000006020808301919091523360601b602f8301528251602381840301815260439092019092528051910120610b15906114fe565b80610b725750604080517f636f6e74726163742e65786973747300000000000000000000000000000000006020808301919091523360601b602f8301528251602381840301815260439092019092528051910120610b72906114fe565b610bad5760405162461bcd60e51b8152600401808060200182810382526024815260200180612bfd6024913960400191505060405180910390fd5b610c1e8460405160200180807f6e6f64652e6465706f7369742e6372656469742e62616c616e63650000000000815250601b018273ffffffffffffffffffffffffffffffffffffffff1660601b81526014019150506040516020818303038152906040528051906020012084611961565b50505050565b6040518060400160405280601181526020017f726f636b65744e6f64654465706f73697400000000000000000000000000000081525030610cb88260405160200180807f636f6e74726163742e61646472657373000000000000000000000000000000008152506010018280519060200190808383602083106101345780518252601f199092019160209182019101610115565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610d37576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b604080517f6e6f64652e65786973747300000000000000000000000000000000000000000060208083019190915233606081901b602b8401528351601f818503018152603f9093019093528151910120610d90906114fe565b610de1576040805162461bcd60e51b815260206004820152600c60248201527f496e76616c6964206e6f64650000000000000000000000000000000000000000604482015290519081900360640190fd5b610de96119f6565b610df1611ae8565b610dfa89611c0e565b610e038a6106db565b610e54576040805162461bcd60e51b815260206004820152601660248201527f496e76616c6964206465706f73697420616d6f756e7400000000000000000000604482015290519081900360640190fd5b6000610e77604051806060016040528060218152602001612b6a60219139611d0a565b905060008173ffffffffffffffffffffffffffffffffffffffff166308e50d386040518163ffffffff1660e01b815260040160206040518083038186803b158015610ec157600080fd5b505afa158015610ed5573d6000803e3d6000fd5b505050506040513d6020811015610eeb57600080fd5b50519050610f0233610efd838f611dd4565b611e31565b610f10888b8b8f8b8b612056565b50505050505050505050505050565b6040805160028082526060808301845292600092919060208301908036833701905050905067de0b6b3a7640000081600081518110610f5a57fe5b602002602001018181525050676f05b59d3b20000081600181518110610f7c57fe5b6020908102919091010152905090565b6040518060400160405280601181526020017f726f636b65744e6f64654465706f736974000000000000000000000000000000815250306110208260405160200180807f636f6e74726163742e61646472657373000000000000000000000000000000008152506010018280519060200190808383602083106101345780518252601f199092019160209182019101610115565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461109f576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b604080517f636f6e74726163742e65786973747300000000000000000000000000000000006020808301919091523360601b602f83015282516023818403018152604390920190925280519101206110f6906114fe565b6111315760405162461bcd60e51b8152600401808060200182810382526024815260200180612bfd6024913960400191505060405180910390fd5b610c1e8484611e31565b6040518060400160405280601181526020017f726f636b65744e6f64654465706f736974000000000000000000000000000000815250306111cf8260405160200180807f636f6e74726163742e61646472657373000000000000000000000000000000008152506010018280519060200190808383602083106101345780518252601f199092019160209182019101610115565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461124e576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b604080517f6e6f64652e65786973747300000000000000000000000000000000000000000060208083019190915233606081901b602b8401528351601f818503018152603f90930190935281519101206112a7906114fe565b6112f8576040805162461bcd60e51b815260206004820152600c60248201527f496e76616c6964206e6f64650000000000000000000000000000000000000000604482015290519081900360640190fd5b600061130333610700565b90508c8110156113ce5760006113198e83611dd4565b905080341461136f576040805162461bcd60e51b815260206004820152600d60248201527f496e76616c69642076616c756500000000000000000000000000000000000000604482015290519081900360640190fd5b604080517f6e6f64652e6465706f7369742e6372656469742e62616c616e636500000000006020808301919091523360601b603b8301528251602f818403018152604f90920190925280519101206113c8906000612362565b50611479565b3415611421576040805162461bcd60e51b815260206004820152600d60248201527f496e76616c69642076616c756500000000000000000000000000000000000000604482015290519081900360640190fd5b604080517f6e6f64652e6465706f7369742e6372656469742e62616c616e636500000000006020808301919091523360601b603b8301528251602f818403018152604f9092019092528051910120611479908e6123db565b610f108d8d8d8d8d8d8d8d8d611572565b60008060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663bd02d0f5836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156106a957600080fd5b60008060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637ae1cfca836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156106a957600080fd5b61157a612454565b611582611ae8565b61158b88611c0e565b611594896106db565b6115e5576040805162461bcd60e51b815260206004820152601660248201527f496e76616c6964206465706f73697420616d6f756e7400000000000000000000604482015290519081900360640190fd5b600080600061160b604051806060016040528060218152602001612b6a60219139611d0a565b90508073ffffffffffffffffffffffffffffffffffffffff166308e50d386040518163ffffffff1660e01b815260040160206040518083038186803b15801561165357600080fd5b505afa158015611667573d6000803e3d6000fd5b505050506040513d602081101561167d57600080fd5b5051604080517fd6047def000000000000000000000000000000000000000000000000000000008152905191945073ffffffffffffffffffffffffffffffffffffffff83169163d6047def91600480820192602092909190829003018186803b1580156116e957600080fd5b505afa1580156116fd573d6000803e3d6000fd5b505050506040513d602081101561171357600080fd5b50519150503481111561181d5760006117606040518060400160405280601181526020017f726f636b65744465706f736974506f6f6c000000000000000000000000000000815250611d0a565b90508073ffffffffffffffffffffffffffffffffffffffff166312065fe06040518163ffffffff1660e01b815260040160206040518083038186803b1580156117a857600080fd5b505afa1580156117bc573d6000803e3d6000fd5b505050506040513d60208110156117d257600080fd5b50516117de8334611dd4565b111561181b5760405162461bcd60e51b8152600401808060200182810382526034815260200180612b366034913960400191505060405180910390fd5b505b60408051348152426020820152815133927f7aa1a8eb998c779420645fc14513bf058edb347d95c2fc2e6845bdc22f888631928290030190a261186433610efd848e611dd4565b60006118708585612543565b905061187c828d612807565b8073ffffffffffffffffffffffffffffffffffffffff16633ca742e9838e8d8d8d8d8d6040518863ffffffff1660e01b81526004018087815260200180602001806020018481526020018381038352888882818152602001925080828437600083820152601f01601f191690910184810383528681526020019050868680828437600081840152601f19601f820116905080830192505050985050505050505050506000604051808303818588803b15801561193757600080fd5b505af115801561194b573d6000803e3d6000fd5b50505050506119598161295f565b61099d612a20565b60008054604080517fadb353dc0000000000000000000000000000000000000000000000000000000081526004810186905260248101859052905161010090920473ffffffffffffffffffffffffffffffffffffffff169263adb353dc9260448084019382900301818387803b1580156119da57600080fd5b505af11580156119ee573d6000803e3d6000fd5b505050505050565b6000611a366040518060400160405280601d81526020017f726f636b657444414f50726f746f636f6c53657474696e67734e6f6465000000815250611d0a565b90508073ffffffffffffffffffffffffffffffffffffffff166346faa2366040518163ffffffff1660e01b815260040160206040518083038186803b158015611a7e57600080fd5b505afa158015611a92573d6000803e3d6000fd5b505050506040513d6020811015611aa857600080fd5b5051611ae55760405162461bcd60e51b8152600401808060200182810382526027815260200180612c766027913960400191505060405180910390fd5b50565b6000611b286040518060400160405280601181526020017f726f636b65744e6f64654d616e61676572000000000000000000000000000000815250611d0a565b90508073ffffffffffffffffffffffffffffffffffffffff1663927ece4f336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611b9157600080fd5b505afa158015611ba5573d6000803e3d6000fd5b505050506040513d6020811015611bbb57600080fd5b5051611ae5576040805162461bcd60e51b815260206004820152601f60248201527f466565206469737472696275746f72206e6f7420696e697469616c6973656400604482015290519081900360640190fd5b6000611c4e6040518060400160405280601181526020017f726f636b65744e6574776f726b46656573000000000000000000000000000000815250611d0a565b905060008173ffffffffffffffffffffffffffffffffffffffff1663e71501346040518163ffffffff1660e01b815260040160206040518083038186803b158015611c9857600080fd5b505afa158015611cac573d6000803e3d6000fd5b505050506040513d6020811015611cc257600080fd5b5051905082811015611d055760405162461bcd60e51b8152600401808060200182810382526031815260200180612c456031913960400191505060405180910390fd5b505050565b600080611d6a8360405160200180807f636f6e74726163742e61646472657373000000000000000000000000000000008152506010018280519060200190808383602083106101345780518252601f199092019160209182019101610115565b905073ffffffffffffffffffffffffffffffffffffffff81166106fa576040805162461bcd60e51b815260206004820152601260248201527f436f6e7472616374206e6f7420666f756e640000000000000000000000000000604482015290519081900360640190fd5b600082821115611e2b576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6000611e716040518060400160405280601181526020017f726f636b65744e6f64655374616b696e67000000000000000000000000000000815250611d0a565b90506000611f12838373ffffffffffffffffffffffffffffffffffffffff1663a493e6a2876040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611ee057600080fd5b505afa158015611ef4573d6000803e3d6000fd5b505050506040513d6020811015611f0a57600080fd5b505190612ad4565b90508173ffffffffffffffffffffffffffffffffffffffff166348aeedf5856040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611f7b57600080fd5b505afa158015611f8f573d6000803e3d6000fd5b505050506040513d6020811015611fa557600080fd5b5051811115611fe55760405162461bcd60e51b815260040180806020018281038252603f815260200180612bbe603f913960400191505060405180910390fd5b610c1e8460405160200180807f6574682e6d6174636865642e6e6f64652e616d6f756e740000000000000000008152506017018273ffffffffffffffffffffffffffffffffffffffff1660601b81526014019150506040516020818303038152906040528051906020012082612362565b6000806120976040518060400160405280601581526020017f726f636b65744d696e69706f6f6c4d616e616765720000000000000000000000815250611d0a565b90508073ffffffffffffffffffffffffffffffffffffffff1663606bb62e856040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561210057600080fd5b505afa158015612114573d6000803e3d6000fd5b505050506040513d602081101561212a57600080fd5b50511580156121c957508073ffffffffffffffffffffffffffffffffffffffff1663a757987a856040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561219b57600080fd5b505afa1580156121af573d6000803e3d6000fd5b505050506040513d60208110156121c557600080fd5b5051155b6122045760405162461bcd60e51b8152600401808060200182810382526033815260200180612b8b6033913960400191505060405180910390fd5b60008173ffffffffffffffffffffffffffffffffffffffff1663a179778b338b8b8b8b8a6040518763ffffffff1660e01b8152600401808773ffffffffffffffffffffffffffffffffffffffff168152602001868152602001806020018481526020018381526020018281038252868682818152602001925080828437600081840152601f19601f820116905080830192505050975050505050505050602060405180830381600087803b1580156122bb57600080fd5b505af11580156122cf573d6000803e3d6000fd5b505050506040513d60208110156122e557600080fd5b5051905073ffffffffffffffffffffffffffffffffffffffff80821690861614612356576040805162461bcd60e51b815260206004820152601b60248201527f556e6578706563746564206d696e69706f6f6c20616464726573730000000000604482015290519081900360640190fd5b98975050505050505050565b60008054604080517fe2a4853a0000000000000000000000000000000000000000000000000000000081526004810186905260248101859052905161010090920473ffffffffffffffffffffffffffffffffffffffff169263e2a4853a9260448084019382900301818387803b1580156119da57600080fd5b60008054604080517febb9d8c90000000000000000000000000000000000000000000000000000000081526004810186905260248101859052905161010090920473ffffffffffffffffffffffffffffffffffffffff169263ebb9d8c99260448084019382900301818387803b1580156119da57600080fd5b60006124946040518060400160405280601d81526020017f726f636b657444414f50726f746f636f6c53657474696e67734e6f6465000000815250611d0a565b90508073ffffffffffffffffffffffffffffffffffffffff16636ada78476040518163ffffffff1660e01b815260040160206040518083038186803b1580156124dc57600080fd5b505afa1580156124f0573d6000803e3d6000fd5b505050506040513d602081101561250657600080fd5b5051611ae55760405162461bcd60e51b8152600401808060200182810382526024815260200180612c216024913960400191505060405180910390fd5b6000806125846040518060400160405280601581526020017f726f636b65744d696e69706f6f6c4d616e616765720000000000000000000000815250611d0a565b90508073ffffffffffffffffffffffffffffffffffffffff1663606bb62e846040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156125ed57600080fd5b505afa158015612601573d6000803e3d6000fd5b505050506040513d602081101561261757600080fd5b50511580156126b657508073ffffffffffffffffffffffffffffffffffffffff1663a757987a846040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561268857600080fd5b505afa15801561269c573d6000803e3d6000fd5b505050506040513d60208110156126b257600080fd5b5051155b6126f15760405162461bcd60e51b8152600401808060200182810382526033815260200180612b8b6033913960400191505060405180910390fd5b60008173ffffffffffffffffffffffffffffffffffffffff1663c64372bb33876040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561276457600080fd5b505af1158015612778573d6000803e3d6000fd5b505050506040513d602081101561278e57600080fd5b5051905073ffffffffffffffffffffffffffffffffffffffff808216908516146127ff576040805162461bcd60e51b815260206004820152601b60248201527f556e6578706563746564206d696e69706f6f6c20616464726573730000000000604482015290519081900360640190fd5b949350505050565b60006128476040518060400160405280601181526020017f726f636b65744465706f736974506f6f6c000000000000000000000000000000815250611d0a565b90506000833410156128cb5761285d8434611dd4565b90508173ffffffffffffffffffffffffffffffffffffffff1663606b6497826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156128b257600080fd5b505af11580156128c6573d6000803e3d6000fd5b505050505b60006128e1856128db3485612ad4565b90611dd4565b905073ffffffffffffffffffffffffffffffffffffffff83166322b1751d8261290a8789611dd4565b6040518363ffffffff1660e01b8152600401808281526020019150506000604051808303818588803b15801561293f57600080fd5b505af1158015612953573d6000803e3d6000fd5b50505050505050505050565b61299d6040518060400160405280601381526020017f726f636b65744d696e69706f6f6c517565756500000000000000000000000000815250611d0a565b73ffffffffffffffffffffffffffffffffffffffff16632f3eb409826040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b158015612a0557600080fd5b505af1158015612a19573d6000803e3d6000fd5b5050505050565b6000612a606040518060400160405280601181526020017f726f636b65744465706f736974506f6f6c000000000000000000000000000000815250611d0a565b90508073ffffffffffffffffffffffffffffffffffffffff16633b36f5926040518163ffffffff1660e01b8152600401602060405180830381600087803b158015612aaa57600080fd5b505af1158015612abe573d6000803e3d6000fd5b505050506040513d6020811015611d0557600080fd5b600082820183811015612b2e576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b939250505056fe4465706f73697420706f6f6c2062616c616e636520697320696e73756666696369656e7420666f7220707265206465706f736974726f636b657444414f50726f746f636f6c53657474696e67734d696e69706f6f6c4d696e69706f6f6c20616c726561647920657869737473206f72207761732070726576696f75736c792064657374726f796564455448206d617463686564206166746572206465706f7369742065786365656473206c696d6974206261736564206f6e206e6f64652052504c207374616b65496e76616c6964206f72206f75746461746564206e6574776f726b20636f6e74726163744e6f6465206465706f73697473206172652063757272656e746c792064697361626c65644d696e696d756d206e6f64652066656520657863656564732063757272656e74206e6574776f726b206e6f646520666565566163616e74206d696e69706f6f6c73206172652063757272656e746c792064697361626c6564a2646970667358221220d3fbcefa24e4d8d69d20518d77fef7dd93c79f4dc50035fc22ddb29ace6232f764736f6c63430007060033000000000000000000000000594fb75d3dc2dfa0150ad03f99f97817747dd4e1
Deployed Bytecode
0x60806040526004361061009a5760003560e01c8063643ff9fe116100695780639bed5a451161004e5780639bed5a451461049a578063aa5c9374146104ff578063f5746ee014610545576101f7565b8063643ff9fe146103a957806398913c8d146103ef576101f7565b8063300d9d99146101fc578063493c94671461023a57806354fd4d501461028c578063598d90c5146102b7576101f7565b366101f7576040518060400160405280601181526020017f726f636b65744465706f736974506f6f6c000000000000000000000000000000815250336101748260405160200180807f636f6e74726163742e616464726573730000000000000000000000000000000081525060100182805190602001908083835b602083106101345780518252601f199092019160209182019101610115565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405280519060200120610635565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146101f3576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b5050005b600080fd5b34801561020857600080fd5b506102266004803603602081101561021f57600080fd5b50356106db565b604080519115158252519081900360200190f35b34801561024657600080fd5b5061027a6004803603602081101561025d57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610700565b60408051918252519081900360200190f35b34801561029857600080fd5b506102a1610772565b6040805160ff9092168252519081900360200190f35b6103a7600480360360e08110156102cd57600080fd5b8135916020810135918101906060810160408201356401000000008111156102f457600080fd5b82018360208201111561030657600080fd5b8035906020019184600183028401116401000000008311171561032857600080fd5b91939092909160208101903564010000000081111561034657600080fd5b82018360208201111561035857600080fd5b8035906020019184600183028401116401000000008311171561037a57600080fd5b91935091508035906020810135906040013573ffffffffffffffffffffffffffffffffffffffff1661077b565b005b3480156103b557600080fd5b506103a7600480360360408110156103cc57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356109ab565b3480156103fb57600080fd5b506103a7600480360360c081101561041257600080fd5b81359160208101359181019060608101604082013564010000000081111561043957600080fd5b82018360208201111561044b57600080fd5b8035906020019184600183028401116401000000008311171561046d57600080fd5b919350915080359073ffffffffffffffffffffffffffffffffffffffff6020820135169060400135610c24565b3480156104a657600080fd5b506104af610f1f565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156104eb5781810151838201526020016104d3565b505050509050019250505060405180910390f35b34801561050b57600080fd5b506103a76004803603604081101561052257600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610f8c565b6103a7600480360360e081101561055b57600080fd5b81359160208101359181019060608101604082013564010000000081111561058257600080fd5b82018360208201111561059457600080fd5b803590602001918460018302840111640100000000831117156105b657600080fd5b9193909290916020810190356401000000008111156105d457600080fd5b8201836020820111156105e657600080fd5b8035906020019184600183028401116401000000008311171561060857600080fd5b91935091508035906020810135906040013573ffffffffffffffffffffffffffffffffffffffff1661113b565b60008060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166321f8a721836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156106a957600080fd5b505afa1580156106bd573d6000803e3d6000fd5b505050506040513d60208110156106d357600080fd5b505192915050565b60008167de0b6b3a7640000014806106fa575081676f05b59d3b200000145b92915050565b60006106fa8260405160200180807f6e6f64652e6465706f7369742e6372656469742e62616c616e63650000000000815250601b018273ffffffffffffffffffffffffffffffffffffffff1660601b81526014019150506040516020818303038152906040528051906020012061148a565b60005460ff1681565b6040518060400160405280601181526020017f726f636b65744e6f64654465706f7369740000000000000000000000000000008152503061080f8260405160200180807f636f6e74726163742e61646472657373000000000000000000000000000000008152506010018280519060200190808383602083106101345780518252601f199092019160209182019101610115565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461088e576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b604080517f6e6f64652e65786973747300000000000000000000000000000000000000000060208083019190915233606081901b602b8401528351601f818503018152603f90930190935281519101206108e7906114fe565b610938576040805162461bcd60e51b815260206004820152600c60248201527f496e76616c6964206e6f64650000000000000000000000000000000000000000604482015290519081900360640190fd5b8b341461098c576040805162461bcd60e51b815260206004820152600d60248201527f496e76616c69642076616c756500000000000000000000000000000000000000604482015290519081900360640190fd5b61099d8c8c8c8c8c8c8c8c8c611572565b505050505050505050505050565b6040518060400160405280601181526020017f726f636b65744e6f64654465706f73697400000000000000000000000000000081525030610a3f8260405160200180807f636f6e74726163742e61646472657373000000000000000000000000000000008152506010018280519060200190808383602083106101345780518252601f199092019160209182019101610115565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610abe576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b604080517f6d696e69706f6f6c2e65786973747300000000000000000000000000000000006020808301919091523360601b602f8301528251602381840301815260439092019092528051910120610b15906114fe565b80610b725750604080517f636f6e74726163742e65786973747300000000000000000000000000000000006020808301919091523360601b602f8301528251602381840301815260439092019092528051910120610b72906114fe565b610bad5760405162461bcd60e51b8152600401808060200182810382526024815260200180612bfd6024913960400191505060405180910390fd5b610c1e8460405160200180807f6e6f64652e6465706f7369742e6372656469742e62616c616e63650000000000815250601b018273ffffffffffffffffffffffffffffffffffffffff1660601b81526014019150506040516020818303038152906040528051906020012084611961565b50505050565b6040518060400160405280601181526020017f726f636b65744e6f64654465706f73697400000000000000000000000000000081525030610cb88260405160200180807f636f6e74726163742e61646472657373000000000000000000000000000000008152506010018280519060200190808383602083106101345780518252601f199092019160209182019101610115565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610d37576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b604080517f6e6f64652e65786973747300000000000000000000000000000000000000000060208083019190915233606081901b602b8401528351601f818503018152603f9093019093528151910120610d90906114fe565b610de1576040805162461bcd60e51b815260206004820152600c60248201527f496e76616c6964206e6f64650000000000000000000000000000000000000000604482015290519081900360640190fd5b610de96119f6565b610df1611ae8565b610dfa89611c0e565b610e038a6106db565b610e54576040805162461bcd60e51b815260206004820152601660248201527f496e76616c6964206465706f73697420616d6f756e7400000000000000000000604482015290519081900360640190fd5b6000610e77604051806060016040528060218152602001612b6a60219139611d0a565b905060008173ffffffffffffffffffffffffffffffffffffffff166308e50d386040518163ffffffff1660e01b815260040160206040518083038186803b158015610ec157600080fd5b505afa158015610ed5573d6000803e3d6000fd5b505050506040513d6020811015610eeb57600080fd5b50519050610f0233610efd838f611dd4565b611e31565b610f10888b8b8f8b8b612056565b50505050505050505050505050565b6040805160028082526060808301845292600092919060208301908036833701905050905067de0b6b3a7640000081600081518110610f5a57fe5b602002602001018181525050676f05b59d3b20000081600181518110610f7c57fe5b6020908102919091010152905090565b6040518060400160405280601181526020017f726f636b65744e6f64654465706f736974000000000000000000000000000000815250306110208260405160200180807f636f6e74726163742e61646472657373000000000000000000000000000000008152506010018280519060200190808383602083106101345780518252601f199092019160209182019101610115565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461109f576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b604080517f636f6e74726163742e65786973747300000000000000000000000000000000006020808301919091523360601b602f83015282516023818403018152604390920190925280519101206110f6906114fe565b6111315760405162461bcd60e51b8152600401808060200182810382526024815260200180612bfd6024913960400191505060405180910390fd5b610c1e8484611e31565b6040518060400160405280601181526020017f726f636b65744e6f64654465706f736974000000000000000000000000000000815250306111cf8260405160200180807f636f6e74726163742e61646472657373000000000000000000000000000000008152506010018280519060200190808383602083106101345780518252601f199092019160209182019101610115565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461124e576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b604080517f6e6f64652e65786973747300000000000000000000000000000000000000000060208083019190915233606081901b602b8401528351601f818503018152603f90930190935281519101206112a7906114fe565b6112f8576040805162461bcd60e51b815260206004820152600c60248201527f496e76616c6964206e6f64650000000000000000000000000000000000000000604482015290519081900360640190fd5b600061130333610700565b90508c8110156113ce5760006113198e83611dd4565b905080341461136f576040805162461bcd60e51b815260206004820152600d60248201527f496e76616c69642076616c756500000000000000000000000000000000000000604482015290519081900360640190fd5b604080517f6e6f64652e6465706f7369742e6372656469742e62616c616e636500000000006020808301919091523360601b603b8301528251602f818403018152604f90920190925280519101206113c8906000612362565b50611479565b3415611421576040805162461bcd60e51b815260206004820152600d60248201527f496e76616c69642076616c756500000000000000000000000000000000000000604482015290519081900360640190fd5b604080517f6e6f64652e6465706f7369742e6372656469742e62616c616e636500000000006020808301919091523360601b603b8301528251602f818403018152604f9092019092528051910120611479908e6123db565b610f108d8d8d8d8d8d8d8d8d611572565b60008060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663bd02d0f5836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156106a957600080fd5b60008060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637ae1cfca836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156106a957600080fd5b61157a612454565b611582611ae8565b61158b88611c0e565b611594896106db565b6115e5576040805162461bcd60e51b815260206004820152601660248201527f496e76616c6964206465706f73697420616d6f756e7400000000000000000000604482015290519081900360640190fd5b600080600061160b604051806060016040528060218152602001612b6a60219139611d0a565b90508073ffffffffffffffffffffffffffffffffffffffff166308e50d386040518163ffffffff1660e01b815260040160206040518083038186803b15801561165357600080fd5b505afa158015611667573d6000803e3d6000fd5b505050506040513d602081101561167d57600080fd5b5051604080517fd6047def000000000000000000000000000000000000000000000000000000008152905191945073ffffffffffffffffffffffffffffffffffffffff83169163d6047def91600480820192602092909190829003018186803b1580156116e957600080fd5b505afa1580156116fd573d6000803e3d6000fd5b505050506040513d602081101561171357600080fd5b50519150503481111561181d5760006117606040518060400160405280601181526020017f726f636b65744465706f736974506f6f6c000000000000000000000000000000815250611d0a565b90508073ffffffffffffffffffffffffffffffffffffffff166312065fe06040518163ffffffff1660e01b815260040160206040518083038186803b1580156117a857600080fd5b505afa1580156117bc573d6000803e3d6000fd5b505050506040513d60208110156117d257600080fd5b50516117de8334611dd4565b111561181b5760405162461bcd60e51b8152600401808060200182810382526034815260200180612b366034913960400191505060405180910390fd5b505b60408051348152426020820152815133927f7aa1a8eb998c779420645fc14513bf058edb347d95c2fc2e6845bdc22f888631928290030190a261186433610efd848e611dd4565b60006118708585612543565b905061187c828d612807565b8073ffffffffffffffffffffffffffffffffffffffff16633ca742e9838e8d8d8d8d8d6040518863ffffffff1660e01b81526004018087815260200180602001806020018481526020018381038352888882818152602001925080828437600083820152601f01601f191690910184810383528681526020019050868680828437600081840152601f19601f820116905080830192505050985050505050505050506000604051808303818588803b15801561193757600080fd5b505af115801561194b573d6000803e3d6000fd5b50505050506119598161295f565b61099d612a20565b60008054604080517fadb353dc0000000000000000000000000000000000000000000000000000000081526004810186905260248101859052905161010090920473ffffffffffffffffffffffffffffffffffffffff169263adb353dc9260448084019382900301818387803b1580156119da57600080fd5b505af11580156119ee573d6000803e3d6000fd5b505050505050565b6000611a366040518060400160405280601d81526020017f726f636b657444414f50726f746f636f6c53657474696e67734e6f6465000000815250611d0a565b90508073ffffffffffffffffffffffffffffffffffffffff166346faa2366040518163ffffffff1660e01b815260040160206040518083038186803b158015611a7e57600080fd5b505afa158015611a92573d6000803e3d6000fd5b505050506040513d6020811015611aa857600080fd5b5051611ae55760405162461bcd60e51b8152600401808060200182810382526027815260200180612c766027913960400191505060405180910390fd5b50565b6000611b286040518060400160405280601181526020017f726f636b65744e6f64654d616e61676572000000000000000000000000000000815250611d0a565b90508073ffffffffffffffffffffffffffffffffffffffff1663927ece4f336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611b9157600080fd5b505afa158015611ba5573d6000803e3d6000fd5b505050506040513d6020811015611bbb57600080fd5b5051611ae5576040805162461bcd60e51b815260206004820152601f60248201527f466565206469737472696275746f72206e6f7420696e697469616c6973656400604482015290519081900360640190fd5b6000611c4e6040518060400160405280601181526020017f726f636b65744e6574776f726b46656573000000000000000000000000000000815250611d0a565b905060008173ffffffffffffffffffffffffffffffffffffffff1663e71501346040518163ffffffff1660e01b815260040160206040518083038186803b158015611c9857600080fd5b505afa158015611cac573d6000803e3d6000fd5b505050506040513d6020811015611cc257600080fd5b5051905082811015611d055760405162461bcd60e51b8152600401808060200182810382526031815260200180612c456031913960400191505060405180910390fd5b505050565b600080611d6a8360405160200180807f636f6e74726163742e61646472657373000000000000000000000000000000008152506010018280519060200190808383602083106101345780518252601f199092019160209182019101610115565b905073ffffffffffffffffffffffffffffffffffffffff81166106fa576040805162461bcd60e51b815260206004820152601260248201527f436f6e7472616374206e6f7420666f756e640000000000000000000000000000604482015290519081900360640190fd5b600082821115611e2b576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6000611e716040518060400160405280601181526020017f726f636b65744e6f64655374616b696e67000000000000000000000000000000815250611d0a565b90506000611f12838373ffffffffffffffffffffffffffffffffffffffff1663a493e6a2876040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611ee057600080fd5b505afa158015611ef4573d6000803e3d6000fd5b505050506040513d6020811015611f0a57600080fd5b505190612ad4565b90508173ffffffffffffffffffffffffffffffffffffffff166348aeedf5856040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611f7b57600080fd5b505afa158015611f8f573d6000803e3d6000fd5b505050506040513d6020811015611fa557600080fd5b5051811115611fe55760405162461bcd60e51b815260040180806020018281038252603f815260200180612bbe603f913960400191505060405180910390fd5b610c1e8460405160200180807f6574682e6d6174636865642e6e6f64652e616d6f756e740000000000000000008152506017018273ffffffffffffffffffffffffffffffffffffffff1660601b81526014019150506040516020818303038152906040528051906020012082612362565b6000806120976040518060400160405280601581526020017f726f636b65744d696e69706f6f6c4d616e616765720000000000000000000000815250611d0a565b90508073ffffffffffffffffffffffffffffffffffffffff1663606bb62e856040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561210057600080fd5b505afa158015612114573d6000803e3d6000fd5b505050506040513d602081101561212a57600080fd5b50511580156121c957508073ffffffffffffffffffffffffffffffffffffffff1663a757987a856040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561219b57600080fd5b505afa1580156121af573d6000803e3d6000fd5b505050506040513d60208110156121c557600080fd5b5051155b6122045760405162461bcd60e51b8152600401808060200182810382526033815260200180612b8b6033913960400191505060405180910390fd5b60008173ffffffffffffffffffffffffffffffffffffffff1663a179778b338b8b8b8b8a6040518763ffffffff1660e01b8152600401808773ffffffffffffffffffffffffffffffffffffffff168152602001868152602001806020018481526020018381526020018281038252868682818152602001925080828437600081840152601f19601f820116905080830192505050975050505050505050602060405180830381600087803b1580156122bb57600080fd5b505af11580156122cf573d6000803e3d6000fd5b505050506040513d60208110156122e557600080fd5b5051905073ffffffffffffffffffffffffffffffffffffffff80821690861614612356576040805162461bcd60e51b815260206004820152601b60248201527f556e6578706563746564206d696e69706f6f6c20616464726573730000000000604482015290519081900360640190fd5b98975050505050505050565b60008054604080517fe2a4853a0000000000000000000000000000000000000000000000000000000081526004810186905260248101859052905161010090920473ffffffffffffffffffffffffffffffffffffffff169263e2a4853a9260448084019382900301818387803b1580156119da57600080fd5b60008054604080517febb9d8c90000000000000000000000000000000000000000000000000000000081526004810186905260248101859052905161010090920473ffffffffffffffffffffffffffffffffffffffff169263ebb9d8c99260448084019382900301818387803b1580156119da57600080fd5b60006124946040518060400160405280601d81526020017f726f636b657444414f50726f746f636f6c53657474696e67734e6f6465000000815250611d0a565b90508073ffffffffffffffffffffffffffffffffffffffff16636ada78476040518163ffffffff1660e01b815260040160206040518083038186803b1580156124dc57600080fd5b505afa1580156124f0573d6000803e3d6000fd5b505050506040513d602081101561250657600080fd5b5051611ae55760405162461bcd60e51b8152600401808060200182810382526024815260200180612c216024913960400191505060405180910390fd5b6000806125846040518060400160405280601581526020017f726f636b65744d696e69706f6f6c4d616e616765720000000000000000000000815250611d0a565b90508073ffffffffffffffffffffffffffffffffffffffff1663606bb62e846040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156125ed57600080fd5b505afa158015612601573d6000803e3d6000fd5b505050506040513d602081101561261757600080fd5b50511580156126b657508073ffffffffffffffffffffffffffffffffffffffff1663a757987a846040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561268857600080fd5b505afa15801561269c573d6000803e3d6000fd5b505050506040513d60208110156126b257600080fd5b5051155b6126f15760405162461bcd60e51b8152600401808060200182810382526033815260200180612b8b6033913960400191505060405180910390fd5b60008173ffffffffffffffffffffffffffffffffffffffff1663c64372bb33876040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561276457600080fd5b505af1158015612778573d6000803e3d6000fd5b505050506040513d602081101561278e57600080fd5b5051905073ffffffffffffffffffffffffffffffffffffffff808216908516146127ff576040805162461bcd60e51b815260206004820152601b60248201527f556e6578706563746564206d696e69706f6f6c20616464726573730000000000604482015290519081900360640190fd5b949350505050565b60006128476040518060400160405280601181526020017f726f636b65744465706f736974506f6f6c000000000000000000000000000000815250611d0a565b90506000833410156128cb5761285d8434611dd4565b90508173ffffffffffffffffffffffffffffffffffffffff1663606b6497826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156128b257600080fd5b505af11580156128c6573d6000803e3d6000fd5b505050505b60006128e1856128db3485612ad4565b90611dd4565b905073ffffffffffffffffffffffffffffffffffffffff83166322b1751d8261290a8789611dd4565b6040518363ffffffff1660e01b8152600401808281526020019150506000604051808303818588803b15801561293f57600080fd5b505af1158015612953573d6000803e3d6000fd5b50505050505050505050565b61299d6040518060400160405280601381526020017f726f636b65744d696e69706f6f6c517565756500000000000000000000000000815250611d0a565b73ffffffffffffffffffffffffffffffffffffffff16632f3eb409826040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b158015612a0557600080fd5b505af1158015612a19573d6000803e3d6000fd5b5050505050565b6000612a606040518060400160405280601181526020017f726f636b65744465706f736974506f6f6c000000000000000000000000000000815250611d0a565b90508073ffffffffffffffffffffffffffffffffffffffff16633b36f5926040518163ffffffff1660e01b8152600401602060405180830381600087803b158015612aaa57600080fd5b505af1158015612abe573d6000803e3d6000fd5b505050506040513d6020811015611d0557600080fd5b600082820183811015612b2e576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b939250505056fe4465706f73697420706f6f6c2062616c616e636520697320696e73756666696369656e7420666f7220707265206465706f736974726f636b657444414f50726f746f636f6c53657474696e67734d696e69706f6f6c4d696e69706f6f6c20616c726561647920657869737473206f72207761732070726576696f75736c792064657374726f796564455448206d617463686564206166746572206465706f7369742065786365656473206c696d6974206261736564206f6e206e6f64652052504c207374616b65496e76616c6964206f72206f75746461746564206e6574776f726b20636f6e74726163744e6f6465206465706f73697473206172652063757272656e746c792064697361626c65644d696e696d756d206e6f64652066656520657863656564732063757272656e74206e6574776f726b206e6f646520666565566163616e74206d696e69706f6f6c73206172652063757272656e746c792064697361626c6564a2646970667358221220d3fbcefa24e4d8d69d20518d77fef7dd93c79f4dc50035fc22ddb29ace6232f764736f6c63430007060033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000594fb75d3dc2dfa0150ad03f99f97817747dd4e1
-----Decoded View---------------
Arg [0] : _rocketStorageAddress (address): 0x594Fb75D3dc2DFa0150Ad03F99F97817747dd4E1
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000594fb75d3dc2dfa0150ad03f99f97817747dd4e1
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.