Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 1,556 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Set Smoothing Po... | 17440688 | 671 days ago | IN | 0 ETH | 0.00050176 | ||||
Initialise Fee D... | 17440688 | 671 days ago | IN | 0 ETH | 0.00049797 | ||||
Set Smoothing Po... | 17069635 | 724 days ago | IN | 0 ETH | 0.00387165 | ||||
Register Node | 17069578 | 724 days ago | IN | 0 ETH | 0.01042297 | ||||
Set Smoothing Po... | 17069353 | 724 days ago | IN | 0 ETH | 0.00398898 | ||||
Register Node | 17069065 | 724 days ago | IN | 0 ETH | 0.01186605 | ||||
Set Smoothing Po... | 17068571 | 724 days ago | IN | 0 ETH | 0.00481024 | ||||
Register Node | 17068518 | 724 days ago | IN | 0 ETH | 0.01902937 | ||||
Set Smoothing Po... | 17067592 | 724 days ago | IN | 0 ETH | 0.00580616 | ||||
Register Node | 17067297 | 724 days ago | IN | 0 ETH | 0.0173368 | ||||
Set Smoothing Po... | 17066544 | 724 days ago | IN | 0 ETH | 0.00340236 | ||||
Register Node | 17066503 | 724 days ago | IN | 0 ETH | 0.0114617 | ||||
Register Node | 17066375 | 724 days ago | IN | 0 ETH | 0.00917846 | ||||
Set Smoothing Po... | 17066003 | 724 days ago | IN | 0 ETH | 0.00350794 | ||||
Register Node | 17065899 | 724 days ago | IN | 0 ETH | 0.00955935 | ||||
Set Smoothing Po... | 17065168 | 724 days ago | IN | 0 ETH | 0.00329001 | ||||
Set Smoothing Po... | 17064939 | 724 days ago | IN | 0 ETH | 0.00345833 | ||||
Register Node | 17064805 | 724 days ago | IN | 0 ETH | 0.00842149 | ||||
Register Node | 17064535 | 724 days ago | IN | 0 ETH | 0.00995685 | ||||
Set Smoothing Po... | 17064080 | 724 days ago | IN | 0 ETH | 0.00328504 | ||||
Set Smoothing Po... | 17064075 | 724 days ago | IN | 0 ETH | 0.00351969 | ||||
Register Node | 17063894 | 724 days ago | IN | 0 ETH | 0.00915316 | ||||
Register Node | 17063664 | 725 days ago | IN | 0 ETH | 0.01017054 | ||||
Set Smoothing Po... | 17063262 | 725 days ago | IN | 0 ETH | 0.00192555 | ||||
Register Node | 17062743 | 725 days ago | IN | 0 ETH | 0.00847575 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
RocketNodeManager
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 * */ pragma solidity 0.7.6; pragma abicoder v2; // SPDX-License-Identifier: GPL-3.0-only import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "../RocketBase.sol"; import "../../types/MinipoolStatus.sol"; import "../../types/NodeDetails.sol"; import "../../interface/node/RocketNodeManagerInterface.sol"; import "../../interface/rewards/claims/RocketClaimNodeInterface.sol"; import "../../interface/dao/protocol/settings/RocketDAOProtocolSettingsNodeInterface.sol"; import "../../interface/util/AddressSetStorageInterface.sol"; import "../../interface/node/RocketNodeDistributorFactoryInterface.sol"; import "../../interface/minipool/RocketMinipoolManagerInterface.sol"; import "../../interface/node/RocketNodeDistributorInterface.sol"; import "../../interface/dao/node/settings/RocketDAONodeTrustedSettingsRewardsInterface.sol"; import "../../interface/dao/protocol/settings/RocketDAOProtocolSettingsRewardsInterface.sol"; import "../../interface/node/RocketNodeStakingInterface.sol"; // Node registration and management contract RocketNodeManager is RocketBase, RocketNodeManagerInterface { // Libraries using SafeMath for uint256; // Events event NodeRegistered(address indexed node, uint256 time); event NodeTimezoneLocationSet(address indexed node, uint256 time); event NodeRewardNetworkChanged(address indexed node, uint256 network); event NodeSmoothingPoolStateChanged(address indexed node, bool state); // Construct constructor(RocketStorageInterface _rocketStorageAddress) RocketBase(_rocketStorageAddress) { version = 2; } // Get the number of nodes in the network function getNodeCount() override public view returns (uint256) { AddressSetStorageInterface addressSetStorage = AddressSetStorageInterface(getContractAddress("addressSetStorage")); return addressSetStorage.getCount(keccak256(abi.encodePacked("nodes.index"))); } // Get a breakdown of the number of nodes per timezone function getNodeCountPerTimezone(uint256 _offset, uint256 _limit) override external view returns (TimezoneCount[] memory) { // Get contracts AddressSetStorageInterface addressSetStorage = AddressSetStorageInterface(getContractAddress("addressSetStorage")); // Precompute node key bytes32 nodeKey = keccak256(abi.encodePacked("nodes.index")); // Calculate range uint256 totalNodes = addressSetStorage.getCount(nodeKey); uint256 max = _offset.add(_limit); if (max > totalNodes || _limit == 0) { max = totalNodes; } // Create an array with as many elements as there are potential values to return TimezoneCount[] memory counts = new TimezoneCount[](max.sub(_offset)); uint256 uniqueTimezoneCount = 0; // Iterate the minipool range for (uint256 i = _offset; i < max; i++) { address nodeAddress = addressSetStorage.getItem(nodeKey, i); string memory timezone = getString(keccak256(abi.encodePacked("node.timezone.location", nodeAddress))); // Find existing entry in our array bool existing = false; for (uint256 j = 0; j < uniqueTimezoneCount; j++) { if (keccak256(bytes(counts[j].timezone)) == keccak256(bytes(timezone))) { existing = true; // Increment the counter counts[j].count++; break; } } // Entry was not found, so create a new one if (!existing) { counts[uniqueTimezoneCount].timezone = timezone; counts[uniqueTimezoneCount].count = 1; uniqueTimezoneCount++; } } // Dirty hack to cut unused elements off end of return value assembly { mstore(counts, uniqueTimezoneCount) } return counts; } // Get a node address by index function getNodeAt(uint256 _index) override external view returns (address) { AddressSetStorageInterface addressSetStorage = AddressSetStorageInterface(getContractAddress("addressSetStorage")); return addressSetStorage.getItem(keccak256(abi.encodePacked("nodes.index")), _index); } // Check whether a node exists function getNodeExists(address _nodeAddress) override public view returns (bool) { return getBool(keccak256(abi.encodePacked("node.exists", _nodeAddress))); } // Get a node's current withdrawal address function getNodeWithdrawalAddress(address _nodeAddress) override public view returns (address) { return rocketStorage.getNodeWithdrawalAddress(_nodeAddress); } // Get a node's pending withdrawal address function getNodePendingWithdrawalAddress(address _nodeAddress) override public view returns (address) { return rocketStorage.getNodePendingWithdrawalAddress(_nodeAddress); } // Get a node's timezone location function getNodeTimezoneLocation(address _nodeAddress) override public view returns (string memory) { return getString(keccak256(abi.encodePacked("node.timezone.location", _nodeAddress))); } // Register a new node with Rocket Pool function registerNode(string calldata _timezoneLocation) override external onlyLatestContract("rocketNodeManager", address(this)) { // Load contracts RocketDAOProtocolSettingsNodeInterface rocketDAOProtocolSettingsNode = RocketDAOProtocolSettingsNodeInterface(getContractAddress("rocketDAOProtocolSettingsNode")); AddressSetStorageInterface addressSetStorage = AddressSetStorageInterface(getContractAddress("addressSetStorage")); // Check node settings require(rocketDAOProtocolSettingsNode.getRegistrationEnabled(), "Rocket Pool node registrations are currently disabled"); // Check timezone location require(bytes(_timezoneLocation).length >= 4, "The timezone location is invalid"); // Initialise node data setBool(keccak256(abi.encodePacked("node.exists", msg.sender)), true); setString(keccak256(abi.encodePacked("node.timezone.location", msg.sender)), _timezoneLocation); // Add node to index addressSetStorage.addItem(keccak256(abi.encodePacked("nodes.index")), msg.sender); // Initialise fee distributor for this node _initialiseFeeDistributor(msg.sender); // Set node registration time (uses old storage key name for backwards compatibility) setUint(keccak256(abi.encodePacked("rewards.pool.claim.contract.registered.time", "rocketClaimNode", msg.sender)), block.timestamp); // Emit node registered event emit NodeRegistered(msg.sender, block.timestamp); } // Get's the timestamp of when a node was registered function getNodeRegistrationTime(address _nodeAddress) onlyRegisteredNode(_nodeAddress) override public view returns (uint256) { return getUint(keccak256(abi.encodePacked("rewards.pool.claim.contract.registered.time", "rocketClaimNode", _nodeAddress))); } // Set a node's timezone location // Only accepts calls from registered nodes function setTimezoneLocation(string calldata _timezoneLocation) override external onlyLatestContract("rocketNodeManager", address(this)) onlyRegisteredNode(msg.sender) { // Check timezone location require(bytes(_timezoneLocation).length >= 4, "The timezone location is invalid"); // Set timezone location setString(keccak256(abi.encodePacked("node.timezone.location", msg.sender)), _timezoneLocation); // Emit node timezone location set event emit NodeTimezoneLocationSet(msg.sender, block.timestamp); } // Returns true if node has initialised their fee distributor contract function getFeeDistributorInitialised(address _nodeAddress) override public view returns (bool) { // Load contracts RocketNodeDistributorFactoryInterface rocketNodeDistributorFactory = RocketNodeDistributorFactoryInterface(getContractAddress("rocketNodeDistributorFactory")); // Get distributor address address contractAddress = rocketNodeDistributorFactory.getProxyAddress(_nodeAddress); // Check if contract exists at that address uint32 codeSize; assembly { codeSize := extcodesize(contractAddress) } return codeSize > 0; } // Node operators created before the distributor was implemented must call this to setup their distributor contract function initialiseFeeDistributor() override external onlyLatestContract("rocketNodeManager", address(this)) onlyRegisteredNode(msg.sender) { // Prevent multiple calls require(!getFeeDistributorInitialised(msg.sender), "Already initialised"); // Load contracts RocketMinipoolManagerInterface rocketMinipoolManager = RocketMinipoolManagerInterface(getContractAddress("rocketMinipoolManager")); // Calculate and set current average fee numerator uint256 count = rocketMinipoolManager.getNodeMinipoolCount(msg.sender); if (count > 0){ uint256 numerator; // Note: this loop is safe as long as all current node operators at the time of upgrade have few enough minipools for (uint256 i = 0; i < count; i++) { RocketMinipoolInterface minipool = RocketMinipoolInterface(rocketMinipoolManager.getNodeMinipoolAt(msg.sender, i)); if (minipool.getStatus() == MinipoolStatus.Staking){ numerator = numerator.add(minipool.getNodeFee()); } } setUint(keccak256(abi.encodePacked("node.average.fee.numerator", msg.sender)), numerator); } // Create the distributor contract _initialiseFeeDistributor(msg.sender); } // Deploys the fee distributor contract for a given node function _initialiseFeeDistributor(address _nodeAddress) internal { // Load contracts RocketNodeDistributorFactoryInterface rocketNodeDistributorFactory = RocketNodeDistributorFactoryInterface(getContractAddress("rocketNodeDistributorFactory")); // Create the distributor proxy rocketNodeDistributorFactory.createProxy(_nodeAddress); } // Calculates a nodes average node fee function getAverageNodeFee(address _nodeAddress) override external view returns (uint256) { // Load contracts RocketMinipoolManagerInterface rocketMinipoolManager = RocketMinipoolManagerInterface(getContractAddress("rocketMinipoolManager")); // Calculate average uint256 denominator = rocketMinipoolManager.getNodeStakingMinipoolCount(_nodeAddress); if (denominator == 0) { return 0; } uint256 numerator = getUint(keccak256(abi.encodePacked("node.average.fee.numerator", _nodeAddress))); return numerator.div(denominator); } // Designates which network a node would like their rewards relayed to function setRewardNetwork(address _nodeAddress, uint256 _network) override external onlyLatestContract("rocketNodeManager", address(this)) { // Confirm the transaction is from the node's current withdrawal address address withdrawalAddress = rocketStorage.getNodeWithdrawalAddress(_nodeAddress); require(withdrawalAddress == msg.sender, "Only a tx from a node's withdrawal address can change reward network"); // Check network is enabled RocketDAONodeTrustedSettingsRewardsInterface rocketDAONodeTrustedSettingsRewards = RocketDAONodeTrustedSettingsRewardsInterface(getContractAddress("rocketDAONodeTrustedSettingsRewards")); require(rocketDAONodeTrustedSettingsRewards.getNetworkEnabled(_network), "Network is not enabled"); // Set the network setUint(keccak256(abi.encodePacked("node.reward.network", _nodeAddress)), _network); // Emit event emit NodeRewardNetworkChanged(_nodeAddress, _network); } // Returns which network a node has designated as their desired reward network function getRewardNetwork(address _nodeAddress) override public view onlyLatestContract("rocketNodeManager", address(this)) returns (uint256) { return getUint(keccak256(abi.encodePacked("node.reward.network", _nodeAddress))); } // Allows a node to register or deregister from the smoothing pool function setSmoothingPoolRegistrationState(bool _state) override external onlyLatestContract("rocketNodeManager", address(this)) onlyRegisteredNode(msg.sender) { // Ensure registration is enabled RocketDAOProtocolSettingsNodeInterface daoSettingsNode = RocketDAOProtocolSettingsNodeInterface(getContractAddress("rocketDAOProtocolSettingsNode")); require(daoSettingsNode.getSmoothingPoolRegistrationEnabled(), "Smoothing pool registrations are not active"); // Precompute storage keys bytes32 changeKey = keccak256(abi.encodePacked("node.smoothing.pool.changed.time", msg.sender)); bytes32 stateKey = keccak256(abi.encodePacked("node.smoothing.pool.state", msg.sender)); // Get from the DAO settings RocketDAOProtocolSettingsRewardsInterface daoSettingsRewards = RocketDAOProtocolSettingsRewardsInterface(getContractAddress("rocketDAOProtocolSettingsRewards")); uint256 rewardInterval = daoSettingsRewards.getRewardsClaimIntervalTime(); // Ensure node operator has waited the required time uint256 lastChange = getUint(changeKey); require(block.timestamp >= lastChange.add(rewardInterval), "Not enough time has passed since changing state"); // Ensure state is actually changing require(getBool(stateKey) != _state, "Invalid state change"); // Update registration state setUint(changeKey, block.timestamp); setBool(stateKey, _state); // Emit state change event emit NodeSmoothingPoolStateChanged(msg.sender, _state); } // Returns whether a node is registered or not from the smoothing pool function getSmoothingPoolRegistrationState(address _nodeAddress) override public view returns (bool) { return getBool(keccak256(abi.encodePacked("node.smoothing.pool.state", _nodeAddress))); } // Returns the timestamp of when the node last changed their smoothing pool registration state function getSmoothingPoolRegistrationChanged(address _nodeAddress) override external view returns (uint256) { return getUint(keccak256(abi.encodePacked("node.smoothing.pool.changed.time", _nodeAddress))); } // Returns the sum of nodes that are registered for the smoothing pool between _offset and (_offset + _limit) function getSmoothingPoolRegisteredNodeCount(uint256 _offset, uint256 _limit) override external view returns (uint256) { // Get contracts AddressSetStorageInterface addressSetStorage = AddressSetStorageInterface(getContractAddress("addressSetStorage")); // Precompute node key bytes32 nodeKey = keccak256(abi.encodePacked("nodes.index")); // Iterate over the requested minipool range uint256 totalNodes = getNodeCount(); uint256 max = _offset.add(_limit); if (max > totalNodes || _limit == 0) { max = totalNodes; } uint256 count = 0; for (uint256 i = _offset; i < max; i++) { address nodeAddress = addressSetStorage.getItem(nodeKey, i); if (getSmoothingPoolRegistrationState(nodeAddress)) { count++; } } return count; } // Convenience function to return all on-chain details about a given node function getNodeDetails(address _nodeAddress) override external view returns (NodeDetails memory nodeDetails) { // Get contracts RocketNodeStakingInterface rocketNodeStaking = RocketNodeStakingInterface(getContractAddress("rocketNodeStaking")); RocketNodeDistributorFactoryInterface rocketNodeDistributorFactory = RocketNodeDistributorFactoryInterface(getContractAddress("rocketNodeDistributorFactory")); RocketMinipoolManagerInterface rocketMinipoolManager = RocketMinipoolManagerInterface(getContractAddress("rocketMinipoolManager")); IERC20 rocketTokenRETH = IERC20(getContractAddress("rocketTokenRETH")); IERC20 rocketTokenRPL = IERC20(getContractAddress("rocketTokenRPL")); IERC20 rocketTokenRPLFixedSupply = IERC20(getContractAddress("rocketTokenRPLFixedSupply")); // Node details nodeDetails.withdrawalAddress = rocketStorage.getNodeWithdrawalAddress(_nodeAddress); nodeDetails.pendingWithdrawalAddress = rocketStorage.getNodePendingWithdrawalAddress(_nodeAddress); nodeDetails.exists = getNodeExists(_nodeAddress); nodeDetails.registrationTime = getNodeRegistrationTime(_nodeAddress); nodeDetails.timezoneLocation = getNodeTimezoneLocation(_nodeAddress); nodeDetails.feeDistributorInitialised = getFeeDistributorInitialised(_nodeAddress); nodeDetails.rewardNetwork = getRewardNetwork(_nodeAddress); // Staking details nodeDetails.rplStake = rocketNodeStaking.getNodeRPLStake(_nodeAddress); nodeDetails.effectiveRPLStake = rocketNodeStaking.getNodeEffectiveRPLStake(_nodeAddress); nodeDetails.minimumRPLStake = rocketNodeStaking.getNodeMinimumRPLStake(_nodeAddress); nodeDetails.maximumRPLStake = rocketNodeStaking.getNodeMaximumRPLStake(_nodeAddress); nodeDetails.minipoolLimit = rocketNodeStaking.getNodeMinipoolLimit(_nodeAddress); // Distributor details nodeDetails.feeDistributorAddress = rocketNodeDistributorFactory.getProxyAddress(_nodeAddress); // Minipool details nodeDetails.minipoolCount = rocketMinipoolManager.getNodeMinipoolCount(_nodeAddress); // Balance details nodeDetails.balanceETH = _nodeAddress.balance; nodeDetails.balanceRETH = rocketTokenRETH.balanceOf(_nodeAddress); nodeDetails.balanceRPL = rocketTokenRPL.balanceOf(_nodeAddress); nodeDetails.balanceOldRPL = rocketTokenRPLFixedSupply.balanceOf(_nodeAddress); } // Returns a slice of the node operator address set function getNodeAddresses(uint256 _offset, uint256 _limit) override external view returns (address[] memory) { // Get contracts AddressSetStorageInterface addressSetStorage = AddressSetStorageInterface(getContractAddress("addressSetStorage")); // Precompute node key bytes32 nodeKey = keccak256(abi.encodePacked("nodes.index")); // Iterate over the requested minipool range uint256 totalNodes = getNodeCount(); uint256 max = _offset.add(_limit); if (max > totalNodes || _limit == 0) { max = totalNodes; } // Create array big enough for every minipool address[] memory nodes = new address[](max.sub(_offset)); uint256 total = 0; for (uint256 i = _offset; i < max; i++) { nodes[total] = addressSetStorage.getItem(nodeKey, i); total++; } // Dirty hack to cut unused elements off end of return value assembly { mstore(nodes, total) } return nodes; } }
// 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; } }
// 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); }
/** * . * / \ * |.'.| * |'.'| * ,'| |`. * |,-'-|-'-.| * __|_| | _ _ _____ _ * | ___ \| | | | | | ___ \ | | * | |_/ /|__ ___| | _____| |_ | |_/ /__ ___ | | * | // _ \ / __| |/ / _ \ __| | __/ _ \ / _ \| | * | |\ \ (_) | (__| < __/ |_ | | | (_) | (_) | | * \_| \_\___/ \___|_|\_\___|\__| \_| \___/ \___/|_| * +---------------------------------------------------+ * | 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 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 interface RocketDAONodeTrustedSettingsRewardsInterface { function getNetworkEnabled(uint256 _network) 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 RocketDAOProtocolSettingsNodeInterface { function getRegistrationEnabled() external view returns (bool); function getSmoothingPoolRegistrationEnabled() external view returns (bool); function getDepositEnabled() 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 RocketDAOProtocolSettingsRewardsInterface { function setSettingRewardsClaimer(string memory _contractName, uint256 _perc) external; function getRewardsClaimerPerc(string memory _contractName) external view returns (uint256); function getRewardsClaimerPercTimeUpdated(string memory _contractName) external view returns (uint256); function getRewardsClaimersPercTotal() external view returns (uint256); function getRewardsClaimIntervalTime() 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"; import "../../types/MinipoolStatus.sol"; import "../RocketStorageInterface.sol"; interface RocketMinipoolInterface { function initialise(address _nodeAddress, MinipoolDeposit _depositType) 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 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 nodeDeposit(bytes calldata _validatorPubkey, bytes calldata _validatorSignature, bytes32 _depositDataRoot) external payable; function userDeposit() external payable; function distributeBalance() external; function distributeBalanceAndFinalise() external; function refund() external; function slash() external; function finalise() external; function canStake() external view returns (bool); function stake(bytes calldata _validatorSignature, bytes32 _depositDataRoot) external; function setWithdrawable() external; function dissolve() external; function close() external; function voteScrub() 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; 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 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 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 getMinipoolWithdrawalCredentials(address _minipoolAddress) external pure returns (bytes memory); function createMinipool(address _nodeAddress, MinipoolDeposit _depositType, uint256 _salt) external returns (RocketMinipoolInterface); 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 getMinipoolDetails(address _minipoolAddress) external view returns (MinipoolDetails memory); }
/** * . * / \ * |.'.| * |'.'| * ,'| |`. * |,-'-|-'-.| * __|_| | _ _ _____ _ * | ___ \| | | | | | ___ \ | | * | |_/ /|__ ___| | _____| |_ | |_/ /__ ___ | | * | // _ \ / __| |/ / _ \ __| | __/ _ \ / _ \| | * | |\ \ (_) | (__| < __/ |_ | | | (_) | (_) | | * \_| \_\___/ \___|_|\_\___|\__| \_| \___/ \___/|_| * +---------------------------------------------------+ * | 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 interface RocketNodeDistributorFactoryInterface { function getProxyBytecode() external pure returns (bytes memory); function getProxyAddress(address _nodeAddress) external view returns(address); function createProxy(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 interface RocketNodeDistributorInterface { function distribute() 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; 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); }
/** * . * / \ * |.'.| * |'.'| * ,'| |`. * |,-'-|-'-.| * __|_| | _ _ _____ _ * | ___ \| | | | | | ___ \ | | * | |_/ /|__ ___| | _____| |_ | |_/ /__ ___ | | * | // _ \ / __| |/ / _ \ __| | __/ _ \ / _ \| | * | |\ \ (_) | (__| < __/ |_ | | | (_) | (_) | | * \_| \_\___/ \___|_|\_\___|\__| \_| \___/ \___/|_| * +---------------------------------------------------+ * | 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 getNodeRPLStakedTime(address _nodeAddress) external view returns (uint256); function getTotalEffectiveRPLStake() external view returns (uint256); function calculateTotalEffectiveRPLStake(uint256 offset, uint256 limit, uint256 rplPrice) 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 getNodeMinipoolLimit(address _nodeAddress) external view returns (uint256); function stakeRPL(uint256 _amount) external; function stakeRPLFor(address _nodeAddress, uint256 _amount) external; function withdrawRPL(uint256 _amount) external; function slashRPL(address _nodeAddress, uint256 _ethSlashAmount) 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 RocketClaimNodeInterface { function getEnabled() external view returns (bool); function getClaimPossible(address _nodeAddress) external view returns (bool); function getClaimRewardsPerc(address _nodeAddress) external view returns (uint256); function getClaimRewardsAmount(address _nodeAddress) external view returns (uint256); function register(address _nodeAddress, bool _enable) external; function claim() 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 AddressSetStorageInterface { function getCount(bytes32 _key) external view returns (uint); function getItem(bytes32 _key, uint _index) external view returns (address); function getIndexOf(bytes32 _key, address _value) external view returns (int); function addItem(bytes32 _key, address _value) external; function removeItem(bytes32 _key, address _value) 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) }
/** * . * / \ * |.'.| * |'.'| * ,'| |`. * |,-'-|-'-.| * __|_| | _ _ _____ _ * | ___ \| | | | | | ___ \ | | * | |_/ /|__ ___| | _____| |_ | |_/ /__ ___ | | * | // _ \ / __| |/ / _ \ __| | __/ _ \ / _ \| | * | |\ \ (_) | (__| < __/ |_ | | | (_) | (_) | | * \_| \_\___/ \___|_|\_\___|\__| \_| \___/ \___/|_| * +---------------------------------------------------+ * | 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; }
/** * . * / \ * |.'.| * |'.'| * ,'| |`. * |,-'-|-'-.| * __|_| | _ _ _____ _ * | ___ \| | | | | | ___ \ | | * | |_/ /|__ ___| | _____| |_ | |_/ /__ ___ | | * | // _ \ / __| |/ / _ \ __| | __/ _ \ / _ \| | * | |\ \ (_) | (__| < __/ |_ | | | (_) | (_) | | * \_| \_\___/ \___|_|\_\___|\__| \_| \___/ \___/|_| * +---------------------------------------------------+ * | 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, // The minipool has become withdrawable on the beacon chain and can be withdrawn from by the node operator 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.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 minipoolLimit; uint256 minipoolCount; uint256 balanceETH; uint256 balanceRETH; uint256 balanceRPL; uint256 balanceOldRPL; address withdrawalAddress; address pendingWithdrawalAddress; bool smoothingPoolRegistrationState; uint256 smoothingPoolRegistrationChanged; }
{ "remappings": [], "optimizer": { "enabled": true, "runs": 15000 }, "evmVersion": "istanbul", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"contract RocketStorageInterface","name":"_rocketStorageAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"node","type":"address"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"NodeRegistered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"node","type":"address"},{"indexed":false,"internalType":"uint256","name":"network","type":"uint256"}],"name":"NodeRewardNetworkChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"node","type":"address"},{"indexed":false,"internalType":"bool","name":"state","type":"bool"}],"name":"NodeSmoothingPoolStateChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"node","type":"address"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"NodeTimezoneLocationSet","type":"event"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"}],"name":"getAverageNodeFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"}],"name":"getFeeDistributorInitialised","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_offset","type":"uint256"},{"internalType":"uint256","name":"_limit","type":"uint256"}],"name":"getNodeAddresses","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"getNodeAt","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNodeCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_offset","type":"uint256"},{"internalType":"uint256","name":"_limit","type":"uint256"}],"name":"getNodeCountPerTimezone","outputs":[{"components":[{"internalType":"string","name":"timezone","type":"string"},{"internalType":"uint256","name":"count","type":"uint256"}],"internalType":"struct RocketNodeManagerInterface.TimezoneCount[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"}],"name":"getNodeDetails","outputs":[{"components":[{"internalType":"bool","name":"exists","type":"bool"},{"internalType":"uint256","name":"registrationTime","type":"uint256"},{"internalType":"string","name":"timezoneLocation","type":"string"},{"internalType":"bool","name":"feeDistributorInitialised","type":"bool"},{"internalType":"address","name":"feeDistributorAddress","type":"address"},{"internalType":"uint256","name":"rewardNetwork","type":"uint256"},{"internalType":"uint256","name":"rplStake","type":"uint256"},{"internalType":"uint256","name":"effectiveRPLStake","type":"uint256"},{"internalType":"uint256","name":"minimumRPLStake","type":"uint256"},{"internalType":"uint256","name":"maximumRPLStake","type":"uint256"},{"internalType":"uint256","name":"minipoolLimit","type":"uint256"},{"internalType":"uint256","name":"minipoolCount","type":"uint256"},{"internalType":"uint256","name":"balanceETH","type":"uint256"},{"internalType":"uint256","name":"balanceRETH","type":"uint256"},{"internalType":"uint256","name":"balanceRPL","type":"uint256"},{"internalType":"uint256","name":"balanceOldRPL","type":"uint256"},{"internalType":"address","name":"withdrawalAddress","type":"address"},{"internalType":"address","name":"pendingWithdrawalAddress","type":"address"},{"internalType":"bool","name":"smoothingPoolRegistrationState","type":"bool"},{"internalType":"uint256","name":"smoothingPoolRegistrationChanged","type":"uint256"}],"internalType":"struct NodeDetails","name":"nodeDetails","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"}],"name":"getNodeExists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"}],"name":"getNodePendingWithdrawalAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"}],"name":"getNodeRegistrationTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"}],"name":"getNodeTimezoneLocation","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"}],"name":"getNodeWithdrawalAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"}],"name":"getRewardNetwork","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_offset","type":"uint256"},{"internalType":"uint256","name":"_limit","type":"uint256"}],"name":"getSmoothingPoolRegisteredNodeCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"}],"name":"getSmoothingPoolRegistrationChanged","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"}],"name":"getSmoothingPoolRegistrationState","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initialiseFeeDistributor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_timezoneLocation","type":"string"}],"name":"registerNode","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"},{"internalType":"uint256","name":"_network","type":"uint256"}],"name":"setRewardNetwork","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_state","type":"bool"}],"name":"setSmoothingPoolRegistrationState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_timezoneLocation","type":"string"}],"name":"setTimezoneLocation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405260008054610100600160a81b03191690553480156200002257600080fd5b5060405162003f1238038062003f12833981016040819052620000459162000078565b6000805460ff196001600160a01b0390931661010002610100600160a81b031990911617919091166002179055620000a8565b6000602082840312156200008a578081fd5b81516001600160a01b0381168114620000a1578182fd5b9392505050565b613e5a80620000b86000396000f3fe608060405234801561001057600080fd5b50600436106101825760003560e01c806365d4176f116100d8578063b018f0261161008c578063bafb358111610066578063bafb358114610335578063d565f27614610355578063fd4125131461036857610182565b8063b018f026146102ef578063b715a1aa1461030f578063ba75d8061461032257610182565b806399283f8b116100bd57806399283f8b146102b6578063a4cef9dd146102c9578063a7e6e8b3146102dc57610182565b806365d4176f14610283578063927ece4f146102a357610182565b8063414dd1d21161013a57806354fd4d501161011457806354fd4d50146102465780635b49ff621461025b57806364908a861461027b57610182565b8063414dd1d21461020d57806343f88981146102205780634d99f6331461023357610182565b8063295545401161016b57806329554540146101c55780632d7f21d0146101e557806339bf397e1461020557610182565b806302d8a7321461018757806327c6f43e146101b0575b600080fd5b61019a610195366004613411565b61037b565b6040516101a791906139dc565b60405180910390f35b6101c36101be3660046134cb565b610468565b005b6101d86101d3366004613568565b61087a565b6040516101a79190613940565b6101f86101f3366004613568565b610b8b565b6040516101a791906138f3565b61019a610d48565b61019a61021b366004613411565b610e31565b61019a61022e366004613411565b610f31565b61019a610241366004613411565b611048565b61024e611064565b6040516101a79190613dcd565b61026e610269366004613411565b61106d565b6040516101a791906138c6565b6101c361110b565b610296610291366004613411565b611592565b6040516101a791906139d1565b6102966102b1366004613411565b6115c3565b6101c36102c4366004613474565b611695565b6102966102d7366004613411565b611ad7565b6101c36102ea3660046134cb565b611aed565b6103026102fd366004613411565b611d5f565b6040516101a79190613a0a565b61019a61031d366004613568565b611d75565b61026e610330366004613538565b611ee1565b610348610343366004613411565b611fc6565b6040516101a79190613c91565b6101c3610363366004613449565b61291b565b61026e610376366004613411565b612c1c565b6000816103e18160405160200180807f6e6f64652e657869737473000000000000000000000000000000000000000000815250600b01826001600160a01b031660601b815260140191505060405160208183030381529060405280519060200120612c6a565b610432576040805162461bcd60e51b815260206004820152600c60248201527f496e76616c6964206e6f64650000000000000000000000000000000000000000604482015290519081900360640190fd5b61046183604051602001610446919061378e565b60405160208183030381529060405280519060200120612cf6565b9392505050565b6040518060400160405280601181526020017f726f636b65744e6f64654d616e616765720000000000000000000000000000008152503061053d8260405160200180807f636f6e74726163742e616464726573730000000000000000000000000000000081525060100182805190602001908083835b602083106104fd5780518252601f1990920191602091820191016104de565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405280519060200120612d50565b6001600160a01b0316816001600160a01b0316146105a2576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b60006105e26040518060400160405280601d81526020017f726f636b657444414f50726f746f636f6c53657474696e67734e6f6465000000815250612daa565b905060006106246040518060400160405280601181526020017f6164647265737353657453746f72616765000000000000000000000000000000815250612daa565b9050816001600160a01b03166387b1bb116040518163ffffffff1660e01b815260040160206040518083038186803b15801561065f57600080fd5b505afa158015610673573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106979190613490565b6106bc5760405162461bcd60e51b81526004016106b390613ab1565b60405180910390fd5b60048510156106dd5760405162461bcd60e51b81526004016106b390613b0e565b61070e336040516020016106f1919061368c565b604051602081830303815290604052805190602001206001612e67565b61077433604051602001610722919061381a565b6040516020818303038152906040528051906020012087878080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612ef092505050565b806001600160a01b03166388927166604051602001610792906137f1565b60405160208183030381529060405280519060200120336040518363ffffffff1660e01b81526004016107c69291906139e5565b600060405180830381600087803b1580156107e057600080fd5b505af11580156107f4573d6000803e3d6000fd5b5050505061080133612fb5565b61083133604051602001610815919061378e565b6040516020818303038152906040528051906020012042613057565b336001600160a01b03167ff773bca07d020a1bc1fdd45ea3db573da547dd27180143afaf075c158a8475944260405161086a91906139dc565b60405180910390a2505050505050565b606060006108bc6040518060400160405280601181526020017f6164647265737353657453746f72616765000000000000000000000000000000815250612daa565b905060006040516020016108cf906137f1565b6040516020818303038152906040528051906020012090506000826001600160a01b031663c9d6fee9836040518263ffffffff1660e01b815260040161091591906139dc565b60206040518083038186803b15801561092d57600080fd5b505afa158015610941573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109659190613550565b9050600061097387876130c3565b905081811180610981575085155b156109895750805b6000610995828961311d565b67ffffffffffffffff811180156109ab57600080fd5b506040519080825280602002602001820160405280156109e557816020015b6109d261333d565b8152602001906001900390816109ca5790505b5090506000885b83811015610b7d576040517ff3358a3a0000000000000000000000000000000000000000000000000000000081526000906001600160a01b0389169063f3358a3a90610a3e908a9086906004016139fc565b60206040518083038186803b158015610a5657600080fd5b505afa158015610a6a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8e919061342d565b90506000610ac182604051602001610aa6919061381a565b6040516020818303038152906040528051906020012061317a565b90506000805b85811015610b2d578280519060200120878281518110610ae357fe5b602002602001015160000151805190602001201415610b255760019150868181518110610b0c57fe5b6020908102919091018101510180516001019052610b2d565b600101610ac7565b5080610b725781868681518110610b4057fe5b6020026020010151600001819052506001868681518110610b5d57fe5b60209081029190910181015101526001909401935b5050506001016109ec565b508152979650505050505050565b60606000610bcd6040518060400160405280601181526020017f6164647265737353657453746f72616765000000000000000000000000000000815250612daa565b90506000604051602001610be0906137f1565b6040516020818303038152906040528051906020012090506000610c02610d48565b90506000610c1087876130c3565b905081811180610c1e575085155b15610c265750805b6000610c32828961311d565b67ffffffffffffffff81118015610c4857600080fd5b50604051908082528060200260200182016040528015610c72578160200160208202803683370190505b5090506000885b83811015610b7d576040517ff3358a3a0000000000000000000000000000000000000000000000000000000081526001600160a01b0388169063f3358a3a90610cc890899085906004016139fc565b60206040518083038186803b158015610ce057600080fd5b505afa158015610cf4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d18919061342d565b838381518110610d2457fe5b6001600160a01b039092166020928302919091019091015260019182019101610c79565b600080610d896040518060400160405280601181526020017f6164647265737353657453746f72616765000000000000000000000000000000815250612daa565b9050806001600160a01b031663c9d6fee9604051602001610da9906137f1565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b8152600401610ddb91906139dc565b60206040518083038186803b158015610df357600080fd5b505afa158015610e07573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e2b9190613550565b91505090565b600080610e726040518060400160405280601581526020017f726f636b65744d696e69706f6f6c4d616e616765720000000000000000000000815250612daa565b90506000816001600160a01b03166357b4ef6b856040518263ffffffff1660e01b8152600401610ea291906138c6565b60206040518083038186803b158015610eba57600080fd5b505afa158015610ece573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ef29190613550565b905080610f0457600092505050610f2c565b6000610f1a856040516020016104469190613870565b9050610f2681836132d6565b93505050505b919050565b60006040518060400160405280601181526020017f726f636b65744e6f64654d616e6167657200000000000000000000000000000081525030610fc78260405160200180807f636f6e74726163742e61646472657373000000000000000000000000000000008152506010018280519060200190808383602083106104fd5780518252601f1990920191602091820191016104de565b6001600160a01b0316816001600160a01b03161461102c576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b6110408460405160200161044691906136e2565b949350505050565b600061105e826040516020016104469190613636565b92915050565b60005460ff1681565b600080546040517f5b49ff620000000000000000000000000000000000000000000000000000000081526101009091046001600160a01b031690635b49ff62906110bb9085906004016138c6565b60206040518083038186803b1580156110d357600080fd5b505afa1580156110e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061105e919061342d565b6040518060400160405280601181526020017f726f636b65744e6f64654d616e616765720000000000000000000000000000008152503061119f8260405160200180807f636f6e74726163742e61646472657373000000000000000000000000000000008152506010018280519060200190808383602083106104fd5780518252601f1990920191602091820191016104de565b6001600160a01b0316816001600160a01b031614611204576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b604080517f6e6f64652e65786973747300000000000000000000000000000000000000000060208083019190915233606081901b602b8401528351601f818503018152603f909301909352815191012061125d90612c6a565b6112ae576040805162461bcd60e51b815260206004820152600c60248201527f496e76616c6964206e6f64650000000000000000000000000000000000000000604482015290519081900360640190fd5b6112b7336115c3565b156112d45760405162461bcd60e51b81526004016106b390613a1d565b60006113146040518060400160405280601581526020017f726f636b65744d696e69706f6f6c4d616e616765720000000000000000000000815250612daa565b90506000816001600160a01b0316631ce9ec33336040518263ffffffff1660e01b815260040161134491906138c6565b60206040518083038186803b15801561135c57600080fd5b505afa158015611370573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113949190613550565b90508015611582576000805b8281101561154f576040517f8b3000290000000000000000000000000000000000000000000000000000000081526000906001600160a01b03861690638b300029906113f290339086906004016138da565b60206040518083038186803b15801561140a57600080fd5b505afa15801561141e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611442919061342d565b90506002816001600160a01b0316634e69d5606040518163ffffffff1660e01b815260040160206040518083038186803b15801561147f57600080fd5b505afa158015611493573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114b791906134ac565b60048111156114c257fe5b141561154657611543816001600160a01b031663e71501346040518163ffffffff1660e01b815260040160206040518083038186803b15801561150457600080fd5b505afa158015611518573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061153c9190613550565b84906130c3565b92505b506001016113a0565b50611580336040516020016115649190613870565b6040516020818303038152906040528051906020012082613057565b505b61158b33612fb5565b5050505050565b600061105e826040516020016115a8919061368c565b60405160208183030381529060405280519060200120612c6a565b6000806116046040518060400160405280601c81526020017f726f636b65744e6f64654469737472696275746f72466163746f727900000000815250612daa565b90506000816001600160a01b031663fa2a5b01856040518263ffffffff1660e01b815260040161163491906138c6565b60206040518083038186803b15801561164c57600080fd5b505afa158015611660573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611684919061342d565b3b63ffffffff161515949350505050565b6040518060400160405280601181526020017f726f636b65744e6f64654d616e61676572000000000000000000000000000000815250306117298260405160200180807f636f6e74726163742e61646472657373000000000000000000000000000000008152506010018280519060200190808383602083106104fd5780518252601f1990920191602091820191016104de565b6001600160a01b0316816001600160a01b03161461178e576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b604080517f6e6f64652e65786973747300000000000000000000000000000000000000000060208083019190915233606081901b602b8401528351601f818503018152603f90930190935281519101206117e790612c6a565b611838576040805162461bcd60e51b815260206004820152600c60248201527f496e76616c6964206e6f64650000000000000000000000000000000000000000604482015290519081900360640190fd5b60006118786040518060400160405280601d81526020017f726f636b657444414f50726f746f636f6c53657474696e67734e6f6465000000815250612daa565b9050806001600160a01b03166301dd16296040518163ffffffff1660e01b815260040160206040518083038186803b1580156118b357600080fd5b505afa1580156118c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118eb9190613490565b6119075760405162461bcd60e51b81526004016106b390613a54565b60003360405160200161191a9190613636565b6040516020818303038152906040528051906020012090506000336040516020016119459190613738565b604051602081830303815290604052805190602001209050600061199d6040518060400160405280602081526020017f726f636b657444414f50726f746f636f6c53657474696e677352657761726473815250612daa565b90506000816001600160a01b03166394e5d5126040518163ffffffff1660e01b815260040160206040518083038186803b1580156119da57600080fd5b505afa1580156119ee573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a129190613550565b90506000611a1f85612cf6565b9050611a2b81836130c3565b421015611a4a5760405162461bcd60e51b81526004016106b390613b43565b891515611a5685612c6a565b15151415611a765760405162461bcd60e51b81526004016106b390613c5a565b611a808542613057565b611a8a848b612e67565b336001600160a01b03167fed2d3ca39683fb0f50a70ed75c33a19bfe200e529d99e6f7518453b3fc4e9be48b604051611ac391906139d1565b60405180910390a250505050505050505050565b600061105e826040516020016115a89190613738565b6040518060400160405280601181526020017f726f636b65744e6f64654d616e6167657200000000000000000000000000000081525030611b818260405160200180807f636f6e74726163742e61646472657373000000000000000000000000000000008152506010018280519060200190808383602083106104fd5780518252601f1990920191602091820191016104de565b6001600160a01b0316816001600160a01b031614611be6576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b604080517f6e6f64652e65786973747300000000000000000000000000000000000000000060208083019190915233606081901b602b8401528351601f818503018152603f9093019093528151910120611c3f90612c6a565b611c90576040805162461bcd60e51b815260206004820152600c60248201527f496e76616c6964206e6f64650000000000000000000000000000000000000000604482015290519081900360640190fd5b6004841015611cb15760405162461bcd60e51b81526004016106b390613b0e565b611d1733604051602001611cc5919061381a565b6040516020818303038152906040528051906020012086868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612ef092505050565b336001600160a01b03167fbb0b10d06b6fa081d0905e789877ce0321fafa4702ffeacaaff6e2d38063616a42604051611d5091906139dc565b60405180910390a25050505050565b606061105e82604051602001610aa6919061381a565b600080611db66040518060400160405280601181526020017f6164647265737353657453746f72616765000000000000000000000000000000815250612daa565b90506000604051602001611dc9906137f1565b6040516020818303038152906040528051906020012090506000611deb610d48565b90506000611df987876130c3565b905081811180611e07575085155b15611e0f5750805b6000875b82811015611ed5576040517ff3358a3a0000000000000000000000000000000000000000000000000000000081526000906001600160a01b0388169063f3358a3a90611e6590899086906004016139fc565b60206040518083038186803b158015611e7d57600080fd5b505afa158015611e91573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611eb5919061342d565b9050611ec081611ad7565b15611ecc576001909201915b50600101611e13565b50979650505050505050565b600080611f226040518060400160405280601181526020017f6164647265737353657453746f72616765000000000000000000000000000000815250612daa565b9050806001600160a01b031663f3358a3a604051602001611f42906137f1565b60405160208183030381529060405280519060200120856040518363ffffffff1660e01b8152600401611f769291906139fc565b60206040518083038186803b158015611f8e57600080fd5b505afa158015611fa2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610461919061342d565b611fce613357565b600061200e6040518060400160405280601181526020017f726f636b65744e6f64655374616b696e67000000000000000000000000000000815250612daa565b905060006120506040518060400160405280601c81526020017f726f636b65744e6f64654469737472696275746f72466163746f727900000000815250612daa565b905060006120926040518060400160405280601581526020017f726f636b65744d696e69706f6f6c4d616e616765720000000000000000000000815250612daa565b905060006120d46040518060400160405280600f81526020017f726f636b6574546f6b656e524554480000000000000000000000000000000000815250612daa565b905060006121166040518060400160405280600e81526020017f726f636b6574546f6b656e52504c000000000000000000000000000000000000815250612daa565b905060006121586040518060400160405280601981526020017f726f636b6574546f6b656e52504c4669786564537570706c7900000000000000815250612daa565b6000546040517f5b49ff6200000000000000000000000000000000000000000000000000000000815291925061010090046001600160a01b031690635b49ff62906121a7908b906004016138c6565b60206040518083038186803b1580156121bf57600080fd5b505afa1580156121d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121f7919061342d565b6001600160a01b039081166102008901526000546040517ffd4125130000000000000000000000000000000000000000000000000000000081526101009091049091169063fd4125139061224f908b906004016138c6565b60206040518083038186803b15801561226757600080fd5b505afa15801561227b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061229f919061342d565b6001600160a01b03166102208801526122b788611592565b151587526122c48861037b565b60208801526122d288611d5f565b60408801526122e0886115c3565b151560608801526122f088610f31565b60a08801526040517f9961cee40000000000000000000000000000000000000000000000000000000081526001600160a01b03871690639961cee49061233a908b906004016138c6565b60206040518083038186803b15801561235257600080fd5b505afa158015612366573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061238a9190613550565b60c08801526040517ff0d19b890000000000000000000000000000000000000000000000000000000081526001600160a01b0387169063f0d19b89906123d4908b906004016138c6565b60206040518083038186803b1580156123ec57600080fd5b505afa158015612400573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124249190613550565b60e08801526040517f03fa87b40000000000000000000000000000000000000000000000000000000081526001600160a01b038716906303fa87b49061246e908b906004016138c6565b60206040518083038186803b15801561248657600080fd5b505afa15801561249a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124be9190613550565b6101008801526040517f4e58ff6e0000000000000000000000000000000000000000000000000000000081526001600160a01b03871690634e58ff6e90612509908b906004016138c6565b60206040518083038186803b15801561252157600080fd5b505afa158015612535573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125599190613550565b6101208801526040517f90f7ff4c0000000000000000000000000000000000000000000000000000000081526001600160a01b038716906390f7ff4c906125a4908b906004016138c6565b60206040518083038186803b1580156125bc57600080fd5b505afa1580156125d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125f49190613550565b6101408801526040517ffa2a5b010000000000000000000000000000000000000000000000000000000081526001600160a01b0386169063fa2a5b019061263f908b906004016138c6565b60206040518083038186803b15801561265757600080fd5b505afa15801561266b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061268f919061342d565b6001600160a01b0390811660808901526040517f1ce9ec3300000000000000000000000000000000000000000000000000000000815290851690631ce9ec33906126dd908b906004016138c6565b60206040518083038186803b1580156126f557600080fd5b505afa158015612709573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061272d9190613550565b6101608801526001600160a01b03808916316101808901526040517f70a08231000000000000000000000000000000000000000000000000000000008152908416906370a0823190612783908b906004016138c6565b60206040518083038186803b15801561279b57600080fd5b505afa1580156127af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127d39190613550565b6101a08801526040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b038316906370a082319061281e908b906004016138c6565b60206040518083038186803b15801561283657600080fd5b505afa15801561284a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061286e9190613550565b6101c08801526040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b038216906370a08231906128b9908b906004016138c6565b60206040518083038186803b1580156128d157600080fd5b505afa1580156128e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129099190613550565b6101e088015250949695505050505050565b6040518060400160405280601181526020017f726f636b65744e6f64654d616e61676572000000000000000000000000000000815250306129af8260405160200180807f636f6e74726163742e61646472657373000000000000000000000000000000008152506010018280519060200190808383602083106104fd5780518252601f1990920191602091820191016104de565b6001600160a01b0316816001600160a01b031614612a14576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b600080546040517f5b49ff620000000000000000000000000000000000000000000000000000000081526101009091046001600160a01b031690635b49ff6290612a629088906004016138c6565b60206040518083038186803b158015612a7a57600080fd5b505afa158015612a8e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ab2919061342d565b90506001600160a01b0381163314612adc5760405162461bcd60e51b81526004016106b390613bd7565b6000612aff604051806060016040528060238152602001613e0260239139612daa565b6040517f6dd2623e0000000000000000000000000000000000000000000000000000000081529091506001600160a01b03821690636dd2623e90612b479088906004016139dc565b60206040518083038186803b158015612b5f57600080fd5b505afa158015612b73573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b979190613490565b612bb35760405162461bcd60e51b81526004016106b390613ba0565b612be386604051602001612bc791906136e2565b6040516020818303038152906040528051906020012086613057565b856001600160a01b03167f7c50987deec06761094239e9ff28caa9cfdd305f9c65011c284a0e40cbf4cfdc8660405161086a91906139dc565b600080546040517ffd4125130000000000000000000000000000000000000000000000000000000081526101009091046001600160a01b03169063fd412513906110bb9085906004016138c6565b60008060019054906101000a90046001600160a01b03166001600160a01b0316637ae1cfca836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015612cc457600080fd5b505afa158015612cd8573d6000803e3d6000fd5b505050506040513d6020811015612cee57600080fd5b505192915050565b60008060019054906101000a90046001600160a01b03166001600160a01b031663bd02d0f5836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015612cc457600080fd5b60008060019054906101000a90046001600160a01b03166001600160a01b03166321f8a721836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015612cc457600080fd5b600080612e0a8360405160200180807f636f6e74726163742e61646472657373000000000000000000000000000000008152506010018280519060200190808383602083106104fd5780518252601f1990920191602091820191016104de565b90506001600160a01b03811661105e576040805162461bcd60e51b815260206004820152601260248201527f436f6e7472616374206e6f7420666f756e640000000000000000000000000000604482015290519081900360640190fd5b60008054604080517fabfdcced00000000000000000000000000000000000000000000000000000000815260048101869052841515602482015290516101009092046001600160a01b03169263abfdcced9260448084019382900301818387803b158015612ed457600080fd5b505af1158015612ee8573d6000803e3d6000fd5b505050505050565b600060019054906101000a90046001600160a01b03166001600160a01b0316636e89955083836040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612f68578181015183820152602001612f50565b50505050905090810190601f168015612f955780820380516001836020036101000a031916815260200191505b509350505050600060405180830381600087803b158015612ed457600080fd5b6000612ff56040518060400160405280601c81526020017f726f636b65744e6f64654469737472696275746f72466163746f727900000000815250612daa565b6040517f6140c54c0000000000000000000000000000000000000000000000000000000081529091506001600160a01b03821690636140c54c9061303d9085906004016138c6565b600060405180830381600087803b158015612ed457600080fd5b60008054604080517fe2a4853a000000000000000000000000000000000000000000000000000000008152600481018690526024810185905290516101009092046001600160a01b03169263e2a4853a9260448084019382900301818387803b158015612ed457600080fd5b600082820183811015610461576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082821115613174576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b60008054604080517f986e791a0000000000000000000000000000000000000000000000000000000081526004810185905290516060936101009093046001600160a01b03169263986e791a9260248082019391829003018186803b1580156131e257600080fd5b505afa1580156131f6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561321f57600080fd5b810190808051604051939291908464010000000082111561323f57600080fd5b90830190602082018581111561325457600080fd5b825164010000000081118282018810171561326e57600080fd5b82525081516020918201929091019080838360005b8381101561329b578181015183820152602001613283565b50505050905090810190601f1680156132c85780820380516001836020036101000a031916815260200191505b506040525050509050919050565b600080821161332c576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161333557fe5b049392505050565b604051806040016040528060608152602001600081525090565b604051806102800160405280600015158152602001600081526020016060815260200160001515815260200160006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160006001600160a01b0316815260200160006001600160a01b03168152602001600015158152602001600081525090565b600060208284031215613422578081fd5b813561046181613ddb565b60006020828403121561343e578081fd5b815161046181613ddb565b6000806040838503121561345b578081fd5b823561346681613ddb565b946020939093013593505050565b600060208284031215613485578081fd5b813561046181613df3565b6000602082840312156134a1578081fd5b815161046181613df3565b6000602082840312156134bd578081fd5b815160058110610461578182fd5b600080602083850312156134dd578182fd5b823567ffffffffffffffff808211156134f4578384fd5b818501915085601f830112613507578384fd5b813581811115613515578485fd5b866020828501011115613526578485fd5b60209290920196919550909350505050565b600060208284031215613549578081fd5b5035919050565b600060208284031215613561578081fd5b5051919050565b6000806040838503121561357a578182fd5b50508035926020909101359150565b6001600160a01b03169052565b15159052565b60008151808452815b818110156135c1576020818501810151868301820152016135a5565b818111156135d25782602083870101525b50601f01601f19169290920160200192915050565b7f726577617264732e706f6f6c2e636c61696d2e636f6e74726163742e7265676981527f7374657265642e74696d650000000000000000000000000000000000000000006020820152602b0190565b7f6e6f64652e736d6f6f7468696e672e706f6f6c2e6368616e6765642e74696d65815260609190911b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016602082015260340190565b7f6e6f64652e657869737473000000000000000000000000000000000000000000815260609190911b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016600b820152601f0190565b7f6e6f64652e7265776172642e6e6574776f726b00000000000000000000000000815260609190911b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016601382015260270190565b7f6e6f64652e736d6f6f7468696e672e706f6f6c2e737461746500000000000000815260609190911b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166019820152602d0190565b6000613799826135e7565b7f726f636b6574436c61696d4e6f64650000000000000000000000000000000000815260609390931b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016600f840152505060230190565b7f6e6f6465732e696e6465780000000000000000000000000000000000000000008152600b0190565b7f6e6f64652e74696d657a6f6e652e6c6f636174696f6e00000000000000000000815260609190911b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166016820152602a0190565b7f6e6f64652e617665726167652e6665652e6e756d657261746f72000000000000815260609190911b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016601a820152602e0190565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6020808252825182820181905260009190848201906040850190845b818110156139345783516001600160a01b03168352928401929184019160010161390f565b50909695505050505050565b60208082528251828201819052600091906040908185019080840286018301878501865b838110156139c3577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0898403018552815180518785526139a68886018261359c565b918901519489019490945294870194925090860190600101613964565b509098975050505050505050565b901515815260200190565b90815260200190565b9182526001600160a01b0316602082015260400190565b918252602082015260400190565b600060208252610461602083018461359c565b60208082526013908201527f416c726561647920696e697469616c6973656400000000000000000000000000604082015260600190565b6020808252602b908201527f536d6f6f7468696e6720706f6f6c20726567697374726174696f6e732061726560408201527f206e6f7420616374697665000000000000000000000000000000000000000000606082015260800190565b60208082526035908201527f526f636b657420506f6f6c206e6f646520726567697374726174696f6e73206160408201527f72652063757272656e746c792064697361626c65640000000000000000000000606082015260800190565b6020808252818101527f5468652074696d657a6f6e65206c6f636174696f6e20697320696e76616c6964604082015260600190565b6020808252602f908201527f4e6f7420656e6f7567682074696d6520686173207061737365642073696e636560408201527f206368616e67696e672073746174650000000000000000000000000000000000606082015260800190565b60208082526016908201527f4e6574776f726b206973206e6f7420656e61626c656400000000000000000000604082015260600190565b60208082526044908201527f4f6e6c7920612074782066726f6d2061206e6f6465277320776974686472617760408201527f616c20616464726573732063616e206368616e676520726577617264206e657460608201527f776f726b00000000000000000000000000000000000000000000000000000000608082015260a00190565b60208082526014908201527f496e76616c6964207374617465206368616e6765000000000000000000000000604082015260600190565b600060208252613ca5602083018451613596565b602083015160408301526040830151610280806060850152613ccb6102a085018361359c565b91506060850151613cdf6080860182613596565b506080850151613cf260a0860182613589565b5060a085015160c08581019190915285015160e08086019190915285015161010080860191909152850151610120808601919091528501516101408086019190915285015161016080860191909152850151610180808601919091528501516101a0808601919091528501516101c0808601919091528501516101e08086019190915285015161020080860191909152850151610220613d9481870183613589565b8601519050610240613da886820183613589565b8601519050610260613dbc86820183613596565b959095015193019290925250919050565b60ff91909116815260200190565b6001600160a01b0381168114613df057600080fd5b50565b8015158114613df057600080fdfe726f636b657444414f4e6f64655472757374656453657474696e677352657761726473a26469706673582212208d55df4b7c9e73c27a2cab95e9dfdb4fa05962992894cfc58ada57167b92559264736f6c634300070600330000000000000000000000001d8f8f00cfa6758d7be78336684788fb0ee0fa46
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101825760003560e01c806365d4176f116100d8578063b018f0261161008c578063bafb358111610066578063bafb358114610335578063d565f27614610355578063fd4125131461036857610182565b8063b018f026146102ef578063b715a1aa1461030f578063ba75d8061461032257610182565b806399283f8b116100bd57806399283f8b146102b6578063a4cef9dd146102c9578063a7e6e8b3146102dc57610182565b806365d4176f14610283578063927ece4f146102a357610182565b8063414dd1d21161013a57806354fd4d501161011457806354fd4d50146102465780635b49ff621461025b57806364908a861461027b57610182565b8063414dd1d21461020d57806343f88981146102205780634d99f6331461023357610182565b8063295545401161016b57806329554540146101c55780632d7f21d0146101e557806339bf397e1461020557610182565b806302d8a7321461018757806327c6f43e146101b0575b600080fd5b61019a610195366004613411565b61037b565b6040516101a791906139dc565b60405180910390f35b6101c36101be3660046134cb565b610468565b005b6101d86101d3366004613568565b61087a565b6040516101a79190613940565b6101f86101f3366004613568565b610b8b565b6040516101a791906138f3565b61019a610d48565b61019a61021b366004613411565b610e31565b61019a61022e366004613411565b610f31565b61019a610241366004613411565b611048565b61024e611064565b6040516101a79190613dcd565b61026e610269366004613411565b61106d565b6040516101a791906138c6565b6101c361110b565b610296610291366004613411565b611592565b6040516101a791906139d1565b6102966102b1366004613411565b6115c3565b6101c36102c4366004613474565b611695565b6102966102d7366004613411565b611ad7565b6101c36102ea3660046134cb565b611aed565b6103026102fd366004613411565b611d5f565b6040516101a79190613a0a565b61019a61031d366004613568565b611d75565b61026e610330366004613538565b611ee1565b610348610343366004613411565b611fc6565b6040516101a79190613c91565b6101c3610363366004613449565b61291b565b61026e610376366004613411565b612c1c565b6000816103e18160405160200180807f6e6f64652e657869737473000000000000000000000000000000000000000000815250600b01826001600160a01b031660601b815260140191505060405160208183030381529060405280519060200120612c6a565b610432576040805162461bcd60e51b815260206004820152600c60248201527f496e76616c6964206e6f64650000000000000000000000000000000000000000604482015290519081900360640190fd5b61046183604051602001610446919061378e565b60405160208183030381529060405280519060200120612cf6565b9392505050565b6040518060400160405280601181526020017f726f636b65744e6f64654d616e616765720000000000000000000000000000008152503061053d8260405160200180807f636f6e74726163742e616464726573730000000000000000000000000000000081525060100182805190602001908083835b602083106104fd5780518252601f1990920191602091820191016104de565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405280519060200120612d50565b6001600160a01b0316816001600160a01b0316146105a2576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b60006105e26040518060400160405280601d81526020017f726f636b657444414f50726f746f636f6c53657474696e67734e6f6465000000815250612daa565b905060006106246040518060400160405280601181526020017f6164647265737353657453746f72616765000000000000000000000000000000815250612daa565b9050816001600160a01b03166387b1bb116040518163ffffffff1660e01b815260040160206040518083038186803b15801561065f57600080fd5b505afa158015610673573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106979190613490565b6106bc5760405162461bcd60e51b81526004016106b390613ab1565b60405180910390fd5b60048510156106dd5760405162461bcd60e51b81526004016106b390613b0e565b61070e336040516020016106f1919061368c565b604051602081830303815290604052805190602001206001612e67565b61077433604051602001610722919061381a565b6040516020818303038152906040528051906020012087878080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612ef092505050565b806001600160a01b03166388927166604051602001610792906137f1565b60405160208183030381529060405280519060200120336040518363ffffffff1660e01b81526004016107c69291906139e5565b600060405180830381600087803b1580156107e057600080fd5b505af11580156107f4573d6000803e3d6000fd5b5050505061080133612fb5565b61083133604051602001610815919061378e565b6040516020818303038152906040528051906020012042613057565b336001600160a01b03167ff773bca07d020a1bc1fdd45ea3db573da547dd27180143afaf075c158a8475944260405161086a91906139dc565b60405180910390a2505050505050565b606060006108bc6040518060400160405280601181526020017f6164647265737353657453746f72616765000000000000000000000000000000815250612daa565b905060006040516020016108cf906137f1565b6040516020818303038152906040528051906020012090506000826001600160a01b031663c9d6fee9836040518263ffffffff1660e01b815260040161091591906139dc565b60206040518083038186803b15801561092d57600080fd5b505afa158015610941573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109659190613550565b9050600061097387876130c3565b905081811180610981575085155b156109895750805b6000610995828961311d565b67ffffffffffffffff811180156109ab57600080fd5b506040519080825280602002602001820160405280156109e557816020015b6109d261333d565b8152602001906001900390816109ca5790505b5090506000885b83811015610b7d576040517ff3358a3a0000000000000000000000000000000000000000000000000000000081526000906001600160a01b0389169063f3358a3a90610a3e908a9086906004016139fc565b60206040518083038186803b158015610a5657600080fd5b505afa158015610a6a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8e919061342d565b90506000610ac182604051602001610aa6919061381a565b6040516020818303038152906040528051906020012061317a565b90506000805b85811015610b2d578280519060200120878281518110610ae357fe5b602002602001015160000151805190602001201415610b255760019150868181518110610b0c57fe5b6020908102919091018101510180516001019052610b2d565b600101610ac7565b5080610b725781868681518110610b4057fe5b6020026020010151600001819052506001868681518110610b5d57fe5b60209081029190910181015101526001909401935b5050506001016109ec565b508152979650505050505050565b60606000610bcd6040518060400160405280601181526020017f6164647265737353657453746f72616765000000000000000000000000000000815250612daa565b90506000604051602001610be0906137f1565b6040516020818303038152906040528051906020012090506000610c02610d48565b90506000610c1087876130c3565b905081811180610c1e575085155b15610c265750805b6000610c32828961311d565b67ffffffffffffffff81118015610c4857600080fd5b50604051908082528060200260200182016040528015610c72578160200160208202803683370190505b5090506000885b83811015610b7d576040517ff3358a3a0000000000000000000000000000000000000000000000000000000081526001600160a01b0388169063f3358a3a90610cc890899085906004016139fc565b60206040518083038186803b158015610ce057600080fd5b505afa158015610cf4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d18919061342d565b838381518110610d2457fe5b6001600160a01b039092166020928302919091019091015260019182019101610c79565b600080610d896040518060400160405280601181526020017f6164647265737353657453746f72616765000000000000000000000000000000815250612daa565b9050806001600160a01b031663c9d6fee9604051602001610da9906137f1565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b8152600401610ddb91906139dc565b60206040518083038186803b158015610df357600080fd5b505afa158015610e07573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e2b9190613550565b91505090565b600080610e726040518060400160405280601581526020017f726f636b65744d696e69706f6f6c4d616e616765720000000000000000000000815250612daa565b90506000816001600160a01b03166357b4ef6b856040518263ffffffff1660e01b8152600401610ea291906138c6565b60206040518083038186803b158015610eba57600080fd5b505afa158015610ece573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ef29190613550565b905080610f0457600092505050610f2c565b6000610f1a856040516020016104469190613870565b9050610f2681836132d6565b93505050505b919050565b60006040518060400160405280601181526020017f726f636b65744e6f64654d616e6167657200000000000000000000000000000081525030610fc78260405160200180807f636f6e74726163742e61646472657373000000000000000000000000000000008152506010018280519060200190808383602083106104fd5780518252601f1990920191602091820191016104de565b6001600160a01b0316816001600160a01b03161461102c576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b6110408460405160200161044691906136e2565b949350505050565b600061105e826040516020016104469190613636565b92915050565b60005460ff1681565b600080546040517f5b49ff620000000000000000000000000000000000000000000000000000000081526101009091046001600160a01b031690635b49ff62906110bb9085906004016138c6565b60206040518083038186803b1580156110d357600080fd5b505afa1580156110e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061105e919061342d565b6040518060400160405280601181526020017f726f636b65744e6f64654d616e616765720000000000000000000000000000008152503061119f8260405160200180807f636f6e74726163742e61646472657373000000000000000000000000000000008152506010018280519060200190808383602083106104fd5780518252601f1990920191602091820191016104de565b6001600160a01b0316816001600160a01b031614611204576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b604080517f6e6f64652e65786973747300000000000000000000000000000000000000000060208083019190915233606081901b602b8401528351601f818503018152603f909301909352815191012061125d90612c6a565b6112ae576040805162461bcd60e51b815260206004820152600c60248201527f496e76616c6964206e6f64650000000000000000000000000000000000000000604482015290519081900360640190fd5b6112b7336115c3565b156112d45760405162461bcd60e51b81526004016106b390613a1d565b60006113146040518060400160405280601581526020017f726f636b65744d696e69706f6f6c4d616e616765720000000000000000000000815250612daa565b90506000816001600160a01b0316631ce9ec33336040518263ffffffff1660e01b815260040161134491906138c6565b60206040518083038186803b15801561135c57600080fd5b505afa158015611370573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113949190613550565b90508015611582576000805b8281101561154f576040517f8b3000290000000000000000000000000000000000000000000000000000000081526000906001600160a01b03861690638b300029906113f290339086906004016138da565b60206040518083038186803b15801561140a57600080fd5b505afa15801561141e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611442919061342d565b90506002816001600160a01b0316634e69d5606040518163ffffffff1660e01b815260040160206040518083038186803b15801561147f57600080fd5b505afa158015611493573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114b791906134ac565b60048111156114c257fe5b141561154657611543816001600160a01b031663e71501346040518163ffffffff1660e01b815260040160206040518083038186803b15801561150457600080fd5b505afa158015611518573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061153c9190613550565b84906130c3565b92505b506001016113a0565b50611580336040516020016115649190613870565b6040516020818303038152906040528051906020012082613057565b505b61158b33612fb5565b5050505050565b600061105e826040516020016115a8919061368c565b60405160208183030381529060405280519060200120612c6a565b6000806116046040518060400160405280601c81526020017f726f636b65744e6f64654469737472696275746f72466163746f727900000000815250612daa565b90506000816001600160a01b031663fa2a5b01856040518263ffffffff1660e01b815260040161163491906138c6565b60206040518083038186803b15801561164c57600080fd5b505afa158015611660573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611684919061342d565b3b63ffffffff161515949350505050565b6040518060400160405280601181526020017f726f636b65744e6f64654d616e61676572000000000000000000000000000000815250306117298260405160200180807f636f6e74726163742e61646472657373000000000000000000000000000000008152506010018280519060200190808383602083106104fd5780518252601f1990920191602091820191016104de565b6001600160a01b0316816001600160a01b03161461178e576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b604080517f6e6f64652e65786973747300000000000000000000000000000000000000000060208083019190915233606081901b602b8401528351601f818503018152603f90930190935281519101206117e790612c6a565b611838576040805162461bcd60e51b815260206004820152600c60248201527f496e76616c6964206e6f64650000000000000000000000000000000000000000604482015290519081900360640190fd5b60006118786040518060400160405280601d81526020017f726f636b657444414f50726f746f636f6c53657474696e67734e6f6465000000815250612daa565b9050806001600160a01b03166301dd16296040518163ffffffff1660e01b815260040160206040518083038186803b1580156118b357600080fd5b505afa1580156118c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118eb9190613490565b6119075760405162461bcd60e51b81526004016106b390613a54565b60003360405160200161191a9190613636565b6040516020818303038152906040528051906020012090506000336040516020016119459190613738565b604051602081830303815290604052805190602001209050600061199d6040518060400160405280602081526020017f726f636b657444414f50726f746f636f6c53657474696e677352657761726473815250612daa565b90506000816001600160a01b03166394e5d5126040518163ffffffff1660e01b815260040160206040518083038186803b1580156119da57600080fd5b505afa1580156119ee573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a129190613550565b90506000611a1f85612cf6565b9050611a2b81836130c3565b421015611a4a5760405162461bcd60e51b81526004016106b390613b43565b891515611a5685612c6a565b15151415611a765760405162461bcd60e51b81526004016106b390613c5a565b611a808542613057565b611a8a848b612e67565b336001600160a01b03167fed2d3ca39683fb0f50a70ed75c33a19bfe200e529d99e6f7518453b3fc4e9be48b604051611ac391906139d1565b60405180910390a250505050505050505050565b600061105e826040516020016115a89190613738565b6040518060400160405280601181526020017f726f636b65744e6f64654d616e6167657200000000000000000000000000000081525030611b818260405160200180807f636f6e74726163742e61646472657373000000000000000000000000000000008152506010018280519060200190808383602083106104fd5780518252601f1990920191602091820191016104de565b6001600160a01b0316816001600160a01b031614611be6576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b604080517f6e6f64652e65786973747300000000000000000000000000000000000000000060208083019190915233606081901b602b8401528351601f818503018152603f9093019093528151910120611c3f90612c6a565b611c90576040805162461bcd60e51b815260206004820152600c60248201527f496e76616c6964206e6f64650000000000000000000000000000000000000000604482015290519081900360640190fd5b6004841015611cb15760405162461bcd60e51b81526004016106b390613b0e565b611d1733604051602001611cc5919061381a565b6040516020818303038152906040528051906020012086868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612ef092505050565b336001600160a01b03167fbb0b10d06b6fa081d0905e789877ce0321fafa4702ffeacaaff6e2d38063616a42604051611d5091906139dc565b60405180910390a25050505050565b606061105e82604051602001610aa6919061381a565b600080611db66040518060400160405280601181526020017f6164647265737353657453746f72616765000000000000000000000000000000815250612daa565b90506000604051602001611dc9906137f1565b6040516020818303038152906040528051906020012090506000611deb610d48565b90506000611df987876130c3565b905081811180611e07575085155b15611e0f5750805b6000875b82811015611ed5576040517ff3358a3a0000000000000000000000000000000000000000000000000000000081526000906001600160a01b0388169063f3358a3a90611e6590899086906004016139fc565b60206040518083038186803b158015611e7d57600080fd5b505afa158015611e91573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611eb5919061342d565b9050611ec081611ad7565b15611ecc576001909201915b50600101611e13565b50979650505050505050565b600080611f226040518060400160405280601181526020017f6164647265737353657453746f72616765000000000000000000000000000000815250612daa565b9050806001600160a01b031663f3358a3a604051602001611f42906137f1565b60405160208183030381529060405280519060200120856040518363ffffffff1660e01b8152600401611f769291906139fc565b60206040518083038186803b158015611f8e57600080fd5b505afa158015611fa2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610461919061342d565b611fce613357565b600061200e6040518060400160405280601181526020017f726f636b65744e6f64655374616b696e67000000000000000000000000000000815250612daa565b905060006120506040518060400160405280601c81526020017f726f636b65744e6f64654469737472696275746f72466163746f727900000000815250612daa565b905060006120926040518060400160405280601581526020017f726f636b65744d696e69706f6f6c4d616e616765720000000000000000000000815250612daa565b905060006120d46040518060400160405280600f81526020017f726f636b6574546f6b656e524554480000000000000000000000000000000000815250612daa565b905060006121166040518060400160405280600e81526020017f726f636b6574546f6b656e52504c000000000000000000000000000000000000815250612daa565b905060006121586040518060400160405280601981526020017f726f636b6574546f6b656e52504c4669786564537570706c7900000000000000815250612daa565b6000546040517f5b49ff6200000000000000000000000000000000000000000000000000000000815291925061010090046001600160a01b031690635b49ff62906121a7908b906004016138c6565b60206040518083038186803b1580156121bf57600080fd5b505afa1580156121d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121f7919061342d565b6001600160a01b039081166102008901526000546040517ffd4125130000000000000000000000000000000000000000000000000000000081526101009091049091169063fd4125139061224f908b906004016138c6565b60206040518083038186803b15801561226757600080fd5b505afa15801561227b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061229f919061342d565b6001600160a01b03166102208801526122b788611592565b151587526122c48861037b565b60208801526122d288611d5f565b60408801526122e0886115c3565b151560608801526122f088610f31565b60a08801526040517f9961cee40000000000000000000000000000000000000000000000000000000081526001600160a01b03871690639961cee49061233a908b906004016138c6565b60206040518083038186803b15801561235257600080fd5b505afa158015612366573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061238a9190613550565b60c08801526040517ff0d19b890000000000000000000000000000000000000000000000000000000081526001600160a01b0387169063f0d19b89906123d4908b906004016138c6565b60206040518083038186803b1580156123ec57600080fd5b505afa158015612400573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124249190613550565b60e08801526040517f03fa87b40000000000000000000000000000000000000000000000000000000081526001600160a01b038716906303fa87b49061246e908b906004016138c6565b60206040518083038186803b15801561248657600080fd5b505afa15801561249a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124be9190613550565b6101008801526040517f4e58ff6e0000000000000000000000000000000000000000000000000000000081526001600160a01b03871690634e58ff6e90612509908b906004016138c6565b60206040518083038186803b15801561252157600080fd5b505afa158015612535573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125599190613550565b6101208801526040517f90f7ff4c0000000000000000000000000000000000000000000000000000000081526001600160a01b038716906390f7ff4c906125a4908b906004016138c6565b60206040518083038186803b1580156125bc57600080fd5b505afa1580156125d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125f49190613550565b6101408801526040517ffa2a5b010000000000000000000000000000000000000000000000000000000081526001600160a01b0386169063fa2a5b019061263f908b906004016138c6565b60206040518083038186803b15801561265757600080fd5b505afa15801561266b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061268f919061342d565b6001600160a01b0390811660808901526040517f1ce9ec3300000000000000000000000000000000000000000000000000000000815290851690631ce9ec33906126dd908b906004016138c6565b60206040518083038186803b1580156126f557600080fd5b505afa158015612709573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061272d9190613550565b6101608801526001600160a01b03808916316101808901526040517f70a08231000000000000000000000000000000000000000000000000000000008152908416906370a0823190612783908b906004016138c6565b60206040518083038186803b15801561279b57600080fd5b505afa1580156127af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127d39190613550565b6101a08801526040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b038316906370a082319061281e908b906004016138c6565b60206040518083038186803b15801561283657600080fd5b505afa15801561284a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061286e9190613550565b6101c08801526040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b038216906370a08231906128b9908b906004016138c6565b60206040518083038186803b1580156128d157600080fd5b505afa1580156128e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129099190613550565b6101e088015250949695505050505050565b6040518060400160405280601181526020017f726f636b65744e6f64654d616e61676572000000000000000000000000000000815250306129af8260405160200180807f636f6e74726163742e61646472657373000000000000000000000000000000008152506010018280519060200190808383602083106104fd5780518252601f1990920191602091820191016104de565b6001600160a01b0316816001600160a01b031614612a14576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b600080546040517f5b49ff620000000000000000000000000000000000000000000000000000000081526101009091046001600160a01b031690635b49ff6290612a629088906004016138c6565b60206040518083038186803b158015612a7a57600080fd5b505afa158015612a8e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ab2919061342d565b90506001600160a01b0381163314612adc5760405162461bcd60e51b81526004016106b390613bd7565b6000612aff604051806060016040528060238152602001613e0260239139612daa565b6040517f6dd2623e0000000000000000000000000000000000000000000000000000000081529091506001600160a01b03821690636dd2623e90612b479088906004016139dc565b60206040518083038186803b158015612b5f57600080fd5b505afa158015612b73573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b979190613490565b612bb35760405162461bcd60e51b81526004016106b390613ba0565b612be386604051602001612bc791906136e2565b6040516020818303038152906040528051906020012086613057565b856001600160a01b03167f7c50987deec06761094239e9ff28caa9cfdd305f9c65011c284a0e40cbf4cfdc8660405161086a91906139dc565b600080546040517ffd4125130000000000000000000000000000000000000000000000000000000081526101009091046001600160a01b03169063fd412513906110bb9085906004016138c6565b60008060019054906101000a90046001600160a01b03166001600160a01b0316637ae1cfca836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015612cc457600080fd5b505afa158015612cd8573d6000803e3d6000fd5b505050506040513d6020811015612cee57600080fd5b505192915050565b60008060019054906101000a90046001600160a01b03166001600160a01b031663bd02d0f5836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015612cc457600080fd5b60008060019054906101000a90046001600160a01b03166001600160a01b03166321f8a721836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015612cc457600080fd5b600080612e0a8360405160200180807f636f6e74726163742e61646472657373000000000000000000000000000000008152506010018280519060200190808383602083106104fd5780518252601f1990920191602091820191016104de565b90506001600160a01b03811661105e576040805162461bcd60e51b815260206004820152601260248201527f436f6e7472616374206e6f7420666f756e640000000000000000000000000000604482015290519081900360640190fd5b60008054604080517fabfdcced00000000000000000000000000000000000000000000000000000000815260048101869052841515602482015290516101009092046001600160a01b03169263abfdcced9260448084019382900301818387803b158015612ed457600080fd5b505af1158015612ee8573d6000803e3d6000fd5b505050505050565b600060019054906101000a90046001600160a01b03166001600160a01b0316636e89955083836040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612f68578181015183820152602001612f50565b50505050905090810190601f168015612f955780820380516001836020036101000a031916815260200191505b509350505050600060405180830381600087803b158015612ed457600080fd5b6000612ff56040518060400160405280601c81526020017f726f636b65744e6f64654469737472696275746f72466163746f727900000000815250612daa565b6040517f6140c54c0000000000000000000000000000000000000000000000000000000081529091506001600160a01b03821690636140c54c9061303d9085906004016138c6565b600060405180830381600087803b158015612ed457600080fd5b60008054604080517fe2a4853a000000000000000000000000000000000000000000000000000000008152600481018690526024810185905290516101009092046001600160a01b03169263e2a4853a9260448084019382900301818387803b158015612ed457600080fd5b600082820183811015610461576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082821115613174576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b60008054604080517f986e791a0000000000000000000000000000000000000000000000000000000081526004810185905290516060936101009093046001600160a01b03169263986e791a9260248082019391829003018186803b1580156131e257600080fd5b505afa1580156131f6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561321f57600080fd5b810190808051604051939291908464010000000082111561323f57600080fd5b90830190602082018581111561325457600080fd5b825164010000000081118282018810171561326e57600080fd5b82525081516020918201929091019080838360005b8381101561329b578181015183820152602001613283565b50505050905090810190601f1680156132c85780820380516001836020036101000a031916815260200191505b506040525050509050919050565b600080821161332c576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161333557fe5b049392505050565b604051806040016040528060608152602001600081525090565b604051806102800160405280600015158152602001600081526020016060815260200160001515815260200160006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160006001600160a01b0316815260200160006001600160a01b03168152602001600015158152602001600081525090565b600060208284031215613422578081fd5b813561046181613ddb565b60006020828403121561343e578081fd5b815161046181613ddb565b6000806040838503121561345b578081fd5b823561346681613ddb565b946020939093013593505050565b600060208284031215613485578081fd5b813561046181613df3565b6000602082840312156134a1578081fd5b815161046181613df3565b6000602082840312156134bd578081fd5b815160058110610461578182fd5b600080602083850312156134dd578182fd5b823567ffffffffffffffff808211156134f4578384fd5b818501915085601f830112613507578384fd5b813581811115613515578485fd5b866020828501011115613526578485fd5b60209290920196919550909350505050565b600060208284031215613549578081fd5b5035919050565b600060208284031215613561578081fd5b5051919050565b6000806040838503121561357a578182fd5b50508035926020909101359150565b6001600160a01b03169052565b15159052565b60008151808452815b818110156135c1576020818501810151868301820152016135a5565b818111156135d25782602083870101525b50601f01601f19169290920160200192915050565b7f726577617264732e706f6f6c2e636c61696d2e636f6e74726163742e7265676981527f7374657265642e74696d650000000000000000000000000000000000000000006020820152602b0190565b7f6e6f64652e736d6f6f7468696e672e706f6f6c2e6368616e6765642e74696d65815260609190911b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016602082015260340190565b7f6e6f64652e657869737473000000000000000000000000000000000000000000815260609190911b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016600b820152601f0190565b7f6e6f64652e7265776172642e6e6574776f726b00000000000000000000000000815260609190911b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016601382015260270190565b7f6e6f64652e736d6f6f7468696e672e706f6f6c2e737461746500000000000000815260609190911b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166019820152602d0190565b6000613799826135e7565b7f726f636b6574436c61696d4e6f64650000000000000000000000000000000000815260609390931b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016600f840152505060230190565b7f6e6f6465732e696e6465780000000000000000000000000000000000000000008152600b0190565b7f6e6f64652e74696d657a6f6e652e6c6f636174696f6e00000000000000000000815260609190911b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166016820152602a0190565b7f6e6f64652e617665726167652e6665652e6e756d657261746f72000000000000815260609190911b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016601a820152602e0190565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6020808252825182820181905260009190848201906040850190845b818110156139345783516001600160a01b03168352928401929184019160010161390f565b50909695505050505050565b60208082528251828201819052600091906040908185019080840286018301878501865b838110156139c3577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0898403018552815180518785526139a68886018261359c565b918901519489019490945294870194925090860190600101613964565b509098975050505050505050565b901515815260200190565b90815260200190565b9182526001600160a01b0316602082015260400190565b918252602082015260400190565b600060208252610461602083018461359c565b60208082526013908201527f416c726561647920696e697469616c6973656400000000000000000000000000604082015260600190565b6020808252602b908201527f536d6f6f7468696e6720706f6f6c20726567697374726174696f6e732061726560408201527f206e6f7420616374697665000000000000000000000000000000000000000000606082015260800190565b60208082526035908201527f526f636b657420506f6f6c206e6f646520726567697374726174696f6e73206160408201527f72652063757272656e746c792064697361626c65640000000000000000000000606082015260800190565b6020808252818101527f5468652074696d657a6f6e65206c6f636174696f6e20697320696e76616c6964604082015260600190565b6020808252602f908201527f4e6f7420656e6f7567682074696d6520686173207061737365642073696e636560408201527f206368616e67696e672073746174650000000000000000000000000000000000606082015260800190565b60208082526016908201527f4e6574776f726b206973206e6f7420656e61626c656400000000000000000000604082015260600190565b60208082526044908201527f4f6e6c7920612074782066726f6d2061206e6f6465277320776974686472617760408201527f616c20616464726573732063616e206368616e676520726577617264206e657460608201527f776f726b00000000000000000000000000000000000000000000000000000000608082015260a00190565b60208082526014908201527f496e76616c6964207374617465206368616e6765000000000000000000000000604082015260600190565b600060208252613ca5602083018451613596565b602083015160408301526040830151610280806060850152613ccb6102a085018361359c565b91506060850151613cdf6080860182613596565b506080850151613cf260a0860182613589565b5060a085015160c08581019190915285015160e08086019190915285015161010080860191909152850151610120808601919091528501516101408086019190915285015161016080860191909152850151610180808601919091528501516101a0808601919091528501516101c0808601919091528501516101e08086019190915285015161020080860191909152850151610220613d9481870183613589565b8601519050610240613da886820183613589565b8601519050610260613dbc86820183613596565b959095015193019290925250919050565b60ff91909116815260200190565b6001600160a01b0381168114613df057600080fd5b50565b8015158114613df057600080fdfe726f636b657444414f4e6f64655472757374656453657474696e677352657761726473a26469706673582212208d55df4b7c9e73c27a2cab95e9dfdb4fa05962992894cfc58ada57167b92559264736f6c63430007060033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000001d8f8f00cfa6758d7be78336684788fb0ee0fa46
-----Decoded View---------------
Arg [0] : _rocketStorageAddress (address): 0x1d8f8f00cfa6758d7bE78336684788Fb0ee0Fa46
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000001d8f8f00cfa6758d7be78336684788fb0ee0fa46
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.