Feature Tip: Add private address tag to any address under My Name Tag !
Latest 25 from a total of 17,986 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Claim | 20145020 | 610 days ago | IN | 0 ETH | 0.00009105 | ||||
| Claim And Stake | 20107586 | 615 days ago | IN | 0 ETH | 0.00135859 | ||||
| Claim | 20107482 | 615 days ago | IN | 0 ETH | 0.00059795 | ||||
| Claim | 20106600 | 615 days ago | IN | 0 ETH | 0.00066778 | ||||
| Claim | 20106550 | 615 days ago | IN | 0 ETH | 0.00048833 | ||||
| Claim | 20106536 | 615 days ago | IN | 0 ETH | 0.00031665 | ||||
| Claim | 20106439 | 615 days ago | IN | 0 ETH | 0.00192044 | ||||
| Claim | 20106275 | 615 days ago | IN | 0 ETH | 0.00054458 | ||||
| Claim And Stake | 20105995 | 615 days ago | IN | 0 ETH | 0.00125379 | ||||
| Claim | 20105700 | 615 days ago | IN | 0 ETH | 0.00141181 | ||||
| Claim And Stake | 20105310 | 615 days ago | IN | 0 ETH | 0.00196835 | ||||
| Claim And Stake | 20105165 | 615 days ago | IN | 0 ETH | 0.00124326 | ||||
| Claim | 20104848 | 615 days ago | IN | 0 ETH | 0.00096657 | ||||
| Claim | 20104846 | 615 days ago | IN | 0 ETH | 0.00083242 | ||||
| Claim | 20104793 | 615 days ago | IN | 0 ETH | 0.00085916 | ||||
| Claim | 20104673 | 615 days ago | IN | 0 ETH | 0.00128187 | ||||
| Claim | 20104479 | 615 days ago | IN | 0 ETH | 0.00093001 | ||||
| Claim | 20104416 | 615 days ago | IN | 0 ETH | 0.00168793 | ||||
| Claim | 20103948 | 615 days ago | IN | 0 ETH | 0.00130668 | ||||
| Claim | 20103666 | 615 days ago | IN | 0 ETH | 0.00130431 | ||||
| Claim And Stake | 20103562 | 615 days ago | IN | 0 ETH | 0.00129166 | ||||
| Claim | 20103391 | 615 days ago | IN | 0 ETH | 0.00064896 | ||||
| Claim And Stake | 20103283 | 615 days ago | IN | 0 ETH | 0.00155085 | ||||
| Claim And Stake | 20103262 | 615 days ago | IN | 0 ETH | 0.00148343 | ||||
| Claim | 20103095 | 615 days ago | IN | 0 ETH | 0.00099213 |
Latest 25 internal transactions (View All)
Advanced mode:
| Parent Transaction Hash | Method | Block |
From
|
|
To
|
||
|---|---|---|---|---|---|---|---|
| Transfer | 20107586 | 615 days ago | 0.06816953 ETH | ||||
| Receive Vault Wi... | 20107586 | 615 days ago | 0.06816953 ETH | ||||
| Transfer | 20107482 | 615 days ago | 0.58490783 ETH | ||||
| Receive Vault Wi... | 20107482 | 615 days ago | 0.58490783 ETH | ||||
| Transfer | 20106550 | 615 days ago | 0.27853705 ETH | ||||
| Receive Vault Wi... | 20106550 | 615 days ago | 0.27853705 ETH | ||||
| Transfer | 20106536 | 615 days ago | 0.0112448 ETH | ||||
| Receive Vault Wi... | 20106536 | 615 days ago | 0.0112448 ETH | ||||
| Transfer | 20106396 | 615 days ago | 0.36959958 ETH | ||||
| Receive Vault Wi... | 20106396 | 615 days ago | 0.36959958 ETH | ||||
| Transfer | 20106275 | 615 days ago | 0.03562344 ETH | ||||
| Receive Vault Wi... | 20106275 | 615 days ago | 0.03562344 ETH | ||||
| Transfer | 20105995 | 615 days ago | 0.00047247 ETH | ||||
| Receive Vault Wi... | 20105995 | 615 days ago | 0.00047247 ETH | ||||
| Transfer | 20105700 | 615 days ago | 0.06891095 ETH | ||||
| Receive Vault Wi... | 20105700 | 615 days ago | 0.06891095 ETH | ||||
| Transfer | 20105310 | 615 days ago | 0.00616556 ETH | ||||
| Receive Vault Wi... | 20105310 | 615 days ago | 0.00616556 ETH | ||||
| Transfer | 20105165 | 615 days ago | 0.08347149 ETH | ||||
| Receive Vault Wi... | 20105165 | 615 days ago | 0.08347149 ETH | ||||
| Transfer | 20104848 | 615 days ago | 0.01125374 ETH | ||||
| Receive Vault Wi... | 20104848 | 615 days ago | 0.01125374 ETH | ||||
| Transfer | 20104846 | 615 days ago | 0.02064629 ETH | ||||
| Receive Vault Wi... | 20104846 | 615 days ago | 0.02064629 ETH | ||||
| Transfer | 20104793 | 615 days ago | 0.01383852 ETH |
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
RocketMerkleDistributorMainnet
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 "../RocketBase.sol";
import "../../interface/token/RocketTokenRPLInterface.sol";
import "../../interface/RocketVaultInterface.sol";
import "../../interface/node/RocketNodeStakingInterface.sol";
import "../../interface/rewards/RocketRewardsRelayInterface.sol";
import "../../interface/rewards/RocketSmoothingPoolInterface.sol";
import "../../interface/RocketVaultWithdrawerInterface.sol";
import "@openzeppelin/contracts/cryptography/MerkleProof.sol";
/*
* On mainnet, the relay and the distributor are the same contract as there is no need for an intermediate contract to
* handle cross-chain messaging.
*/
contract RocketMerkleDistributorMainnet is RocketBase, RocketRewardsRelayInterface, RocketVaultWithdrawerInterface {
// Libs
using SafeMath for uint;
// Events
event RewardsClaimed(address indexed claimer, uint256[] rewardIndex, uint256[] amountRPL, uint256[] amountETH);
// Constants
uint256 constant network = 0;
// Immutables
bytes32 immutable rocketVaultKey;
bytes32 immutable rocketTokenRPLKey;
// Allow receiving ETH
receive() payable external {}
// Construct
constructor(RocketStorageInterface _rocketStorageAddress) RocketBase(_rocketStorageAddress) {
// Version
version = 1;
// Precompute keys
rocketVaultKey = keccak256(abi.encodePacked("contract.address", "rocketVault"));
rocketTokenRPLKey = keccak256(abi.encodePacked("contract.address", "rocketTokenRPL"));
}
// Called by RocketRewardsPool to include a snapshot into this distributor
function relayRewards(uint256 _rewardIndex, bytes32 _root, uint256 _rewardsRPL, uint256 _rewardsETH) external override onlyLatestContract("rocketMerkleDistributorMainnet", address(this)) onlyLatestContract("rocketRewardsPool", msg.sender) {
bytes32 key = keccak256(abi.encodePacked('rewards.merkle.root', _rewardIndex));
require(getBytes32(key) == bytes32(0));
setBytes32(key, _root);
// Send the ETH and RPL to the vault
RocketVaultInterface rocketVault = RocketVaultInterface(getAddress(rocketVaultKey));
if (_rewardsETH > 0) {
rocketVault.depositEther{value: _rewardsETH}();
}
if (_rewardsRPL > 0) {
IERC20 rocketTokenRPL = IERC20(getAddress(rocketTokenRPLKey));
rocketTokenRPL.approve(address(rocketVault), _rewardsRPL);
rocketVault.depositToken("rocketMerkleDistributorMainnet", rocketTokenRPL, _rewardsRPL);
}
}
// Reward recipients can call this method with a merkle proof to claim rewards for one or more reward intervals
function claim(address _nodeAddress, uint256[] calldata _rewardIndex, uint256[] calldata _amountRPL, uint256[] calldata _amountETH, bytes32[][] calldata _merkleProof) external override {
claimAndStake(_nodeAddress, _rewardIndex, _amountRPL, _amountETH, _merkleProof, 0);
}
// Node operators can call this method to claim rewards for one or more reward intervals and specify an amount of RPL to stake at the same time
function claimAndStake(address _nodeAddress, uint256[] calldata _rewardIndex, uint256[] calldata _amountRPL, uint256[] calldata _amountETH, bytes32[][] calldata _merkleProof, uint256 _stakeAmount) public override {
// Get contracts
RocketVaultInterface rocketVault = RocketVaultInterface(getAddress(rocketVaultKey));
address rocketTokenRPLAddress = getAddress(rocketTokenRPLKey);
// Verify claims
_claim(_rewardIndex, _nodeAddress, _amountRPL, _amountETH, _merkleProof);
{
// Get withdrawal address
address withdrawalAddress = rocketStorage.getNodeWithdrawalAddress(_nodeAddress);
require(msg.sender == _nodeAddress || msg.sender == withdrawalAddress, "Can only claim from node or withdrawal address");
// Calculate totals
uint256 totalAmountRPL = 0;
uint256 totalAmountETH = 0;
for (uint256 i = 0; i < _rewardIndex.length; i++) {
totalAmountRPL = totalAmountRPL.add(_amountRPL[i]);
totalAmountETH = totalAmountETH.add(_amountETH[i]);
}
// Validate input
require(_stakeAmount <= totalAmountRPL, "Invalid stake amount");
// Distribute any remaining tokens to the node's withdrawal address
uint256 remaining = totalAmountRPL.sub(_stakeAmount);
if (remaining > 0) {
rocketVault.withdrawToken(withdrawalAddress, IERC20(rocketTokenRPLAddress), remaining);
}
// Distribute ETH
if (totalAmountETH > 0) {
rocketVault.withdrawEther(totalAmountETH);
(bool result,) = withdrawalAddress.call{value: totalAmountETH}("");
require(result, "Failed to claim ETH");
}
}
// Restake requested amount
if (_stakeAmount > 0) {
RocketTokenRPLInterface rocketTokenRPL = RocketTokenRPLInterface(rocketTokenRPLAddress);
RocketNodeStakingInterface rocketNodeStaking = RocketNodeStakingInterface(getContractAddress("rocketNodeStaking"));
rocketVault.withdrawToken(address(this), IERC20(rocketTokenRPLAddress), _stakeAmount);
rocketTokenRPL.approve(address(rocketNodeStaking), _stakeAmount);
rocketNodeStaking.stakeRPLFor(_nodeAddress, _stakeAmount);
}
// Emit event
emit RewardsClaimed(_nodeAddress, _rewardIndex, _amountRPL, _amountETH);
}
// Verifies the given data exists as a leaf nodes for the specified reward interval and marks them as claimed if they are valid
// Note: this function is optimised for gas when _rewardIndex is ordered numerically
function _claim(uint256[] calldata _rewardIndex, address _nodeAddress, uint256[] calldata _amountRPL, uint256[] calldata _amountETH, bytes32[][] calldata _merkleProof) internal {
// Set initial parameters to the first reward index in the array
uint256 indexWordIndex = _rewardIndex[0] / 256;
bytes32 claimedWordKey = keccak256(abi.encodePacked('rewards.interval.claimed', _nodeAddress, indexWordIndex));
uint256 claimedWord = getUint(claimedWordKey);
// Loop over every entry
for (uint256 i = 0; i < _rewardIndex.length; i++) {
// Prevent accidental claim of 0
require(_amountRPL[i] > 0 || _amountETH[i] > 0, "Invalid amount");
// Check if this entry has a different word index than the previous
if (indexWordIndex != _rewardIndex[i] / 256) {
// Store the previous word
setUint(claimedWordKey, claimedWord);
// Load the word for this entry
indexWordIndex = _rewardIndex[i] / 256;
claimedWordKey = keccak256(abi.encodePacked('rewards.interval.claimed', _nodeAddress, indexWordIndex));
claimedWord = getUint(claimedWordKey);
}
// Calculate the bit index for this entry
uint256 indexBitIndex = _rewardIndex[i] % 256;
// Ensure the bit is not yet set on this word
uint256 mask = (1 << indexBitIndex);
require(claimedWord & mask != mask, "Already claimed");
// Verify the merkle proof
require(_verifyProof(_rewardIndex[i], _nodeAddress, _amountRPL[i], _amountETH[i], _merkleProof[i]), "Invalid proof");
// Set the bit for the current reward index
claimedWord = claimedWord | (1 << indexBitIndex);
}
// Store the word
setUint(claimedWordKey, claimedWord);
}
// Verifies that the
function _verifyProof(uint256 _rewardIndex, address _nodeAddress, uint256 _amountRPL, uint256 _amountETH, bytes32[] calldata _merkleProof) internal view returns (bool) {
bytes32 node = keccak256(abi.encodePacked(_nodeAddress, network, _amountRPL, _amountETH));
bytes32 key = keccak256(abi.encodePacked('rewards.merkle.root', _rewardIndex));
bytes32 merkleRoot = getBytes32(key);
return MerkleProof.verify(_merkleProof, merkleRoot, node);
}
// Returns true if the given claimer has claimed for the given reward interval
function isClaimed(uint256 _rewardIndex, address _claimer) public override view returns (bool) {
uint256 indexWordIndex = _rewardIndex / 256;
uint256 indexBitIndex = _rewardIndex % 256;
uint256 claimedWord = getUint(keccak256(abi.encodePacked('rewards.interval.claimed', _claimer, indexWordIndex)));
uint256 mask = (1 << indexBitIndex);
return claimedWord & mask == mask;
}
// Allow receiving ETH from RocketVault, no action required
function receiveVaultWithdrawalETH() external override payable {}
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
/**
* @dev These functions deal with verification of Merkle trees (hash trees),
*/
library MerkleProof {
/**
* @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
* defined by `root`. For this, a `proof` must be provided, containing
* sibling hashes on the branch from the leaf to the root of the tree. Each
* pair of leaves and each pair of pre-images are assumed to be sorted.
*/
function verify(bytes32[] memory proof, bytes32 root, bytes32 leaf) internal pure returns (bool) {
bytes32 computedHash = leaf;
for (uint256 i = 0; i < proof.length; i++) {
bytes32 proofElement = proof[i];
if (computedHash <= proofElement) {
// Hash(current computed hash + current element of the proof)
computedHash = keccak256(abi.encodePacked(computedHash, proofElement));
} else {
// Hash(current element of the proof + current computed hash)
computedHash = keccak256(abi.encodePacked(proofElement, computedHash));
}
}
// Check if the computed hash (root) is equal to the provided root
return computedHash == root;
}
}// 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;
import "../../utils/Context.sol";
import "./IERC20.sol";
import "../../math/SafeMath.sol";
/**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
* https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* We have followed general OpenZeppelin guidelines: functions revert instead
* of returning `false` on failure. This behavior is nonetheless conventional
* and does not conflict with the expectations of ERC20 applications.
*
* Additionally, an {Approval} event is emitted on calls to {transferFrom}.
* This allows applications to reconstruct the allowance for all accounts just
* by listening to said events. Other implementations of the EIP may not emit
* these events, as it isn't required by the specification.
*
* Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
* functions have been added to mitigate the well-known issues around setting
* allowances. See {IERC20-approve}.
*/
contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
/**
* @dev Sets the values for {name} and {symbol}, initializes {decimals} with
* a default value of 18.
*
* To select a different value for {decimals}, use {_setupDecimals}.
*
* All three of these values are immutable: they can only be set once during
* construction.
*/
constructor (string memory name_, string memory symbol_) public {
_name = name_;
_symbol = symbol_;
_decimals = 18;
}
/**
* @dev Returns the name of the token.
*/
function name() public view virtual returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual returns (string memory) {
return _symbol;
}
/**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5,05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is
* called.
*
* NOTE: This information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
function decimals() public view virtual returns (uint8) {
return _decimals;
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view virtual override returns (uint256) {
return _balances[account];
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
/**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount) public virtual override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
/**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20}.
*
* Requirements:
*
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
* - the caller must have allowance for ``sender``'s tokens of at least
* `amount`.
*/
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(sender, recipient, amount);
_approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
return true;
}
/**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
return true;
}
/**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `spender` must have allowance for the caller of at least
* `subtractedValue`.
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
return true;
}
/**
* @dev Moves tokens `amount` from `sender` to `recipient`.
*
* This is internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
* - `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
*/
function _transfer(address sender, address recipient, uint256 amount) internal virtual {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(sender, recipient, amount);
_balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance");
_balances[recipient] = _balances[recipient].add(amount);
emit Transfer(sender, recipient, amount);
}
/** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements:
*
* - `to` cannot be the zero address.
*/
function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply = _totalSupply.add(amount);
_balances[account] = _balances[account].add(amount);
emit Transfer(address(0), account, amount);
}
/**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/
function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
_balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
_totalSupply = _totalSupply.sub(amount);
emit Transfer(account, address(0), amount);
}
/**
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
*/
function _approve(address owner, address spender, uint256 amount) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
/**
* @dev Sets {decimals} to a value other than the default one of 18.
*
* WARNING: This function should only be called from the constructor. Most
* applications that interact with token contracts will not expect
* {decimals} to ever change, and may work incorrectly if it does.
*/
function _setupDecimals(uint8 decimals_) internal virtual {
_decimals = decimals_;
}
/**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be to transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
import "../../utils/Context.sol";
import "./ERC20.sol";
/**
* @dev Extension of {ERC20} that allows token holders to destroy both their own
* tokens and those that they have an allowance for, in a way that can be
* recognized off-chain (via event analysis).
*/
abstract contract ERC20Burnable is Context, ERC20 {
using SafeMath for uint256;
/**
* @dev Destroys `amount` tokens from the caller.
*
* See {ERC20-_burn}.
*/
function burn(uint256 amount) public virtual {
_burn(_msgSender(), amount);
}
/**
* @dev Destroys `amount` tokens from `account`, deducting from the caller's
* allowance.
*
* See {ERC20-_burn} and {ERC20-allowance}.
*
* Requirements:
*
* - the caller must have allowance for ``accounts``'s tokens of at least
* `amount`.
*/
function burnFrom(address account, uint256 amount) public virtual {
uint256 decreasedAllowance = allowance(account, _msgSender()).sub(amount, "ERC20: burn amount exceeds allowance");
_approve(account, _msgSender(), decreasedAllowance);
_burn(account, amount);
}
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with GSN meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes memory) {
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
return msg.data;
}
}/**
* .
* / \
* |.'.|
* |'.'|
* ,'| |`.
* |,-'-|-'-.|
* __|_| | _ _ _____ _
* | ___ \| | | | | | ___ \ | |
* | |_/ /|__ ___| | _____| |_ | |_/ /__ ___ | |
* | // _ \ / __| |/ / _ \ __| | __/ _ \ / _ \| |
* | |\ \ (_) | (__| < __/ |_ | | | (_) | (_) | |
* \_| \_\___/ \___|_|\_\___|\__| \_| \___/ \___/|_|
* +---------------------------------------------------+
* | 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.7.6;
// SPDX-License-Identifier: GPL-3.0-only
interface RocketStorageInterface {
// Deploy status
function getDeployedStatus() external view returns (bool);
// Guardian
function getGuardian() external view returns(address);
function setGuardian(address _newAddress) external;
function confirmGuardian() external;
// Getters
function getAddress(bytes32 _key) external view returns (address);
function getUint(bytes32 _key) external view returns (uint);
function getString(bytes32 _key) external view returns (string memory);
function getBytes(bytes32 _key) external view returns (bytes memory);
function getBool(bytes32 _key) external view returns (bool);
function getInt(bytes32 _key) external view returns (int);
function getBytes32(bytes32 _key) external view returns (bytes32);
// Setters
function setAddress(bytes32 _key, address _value) external;
function setUint(bytes32 _key, uint _value) external;
function setString(bytes32 _key, string calldata _value) external;
function setBytes(bytes32 _key, bytes calldata _value) external;
function setBool(bytes32 _key, bool _value) external;
function setInt(bytes32 _key, int _value) external;
function setBytes32(bytes32 _key, bytes32 _value) external;
// Deleters
function deleteAddress(bytes32 _key) external;
function deleteUint(bytes32 _key) external;
function deleteString(bytes32 _key) external;
function deleteBytes(bytes32 _key) external;
function deleteBool(bytes32 _key) external;
function deleteInt(bytes32 _key) external;
function deleteBytes32(bytes32 _key) external;
// Arithmetic
function addUint(bytes32 _key, uint256 _amount) external;
function subUint(bytes32 _key, uint256 _amount) external;
// Protected storage
function getNodeWithdrawalAddress(address _nodeAddress) external view returns (address);
function getNodePendingWithdrawalAddress(address _nodeAddress) external view returns (address);
function setWithdrawalAddress(address _nodeAddress, address _newWithdrawalAddress, bool _confirm) external;
function confirmWithdrawalAddress(address _nodeAddress) external;
}/**
* .
* / \
* |.'.|
* |'.'|
* ,'| |`.
* |,-'-|-'-.|
* __|_| | _ _ _____ _
* | ___ \| | | | | | ___ \ | |
* | |_/ /|__ ___| | _____| |_ | |_/ /__ ___ | |
* | // _ \ / __| |/ / _ \ __| | __/ _ \ / _ \| |
* | |\ \ (_) | (__| < __/ |_ | | | (_) | (_) | |
* \_| \_\___/ \___|_|\_\___|\__| \_| \___/ \___/|_|
* +---------------------------------------------------+
* | DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0 |
* +---------------------------------------------------+
*
* Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned,
* decentralised, trustless and compatible with staking in Ethereum 2.0.
*
* For more information about Rocket Pool, visit https://rocketpool.net
*
* Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty
*
*/
pragma solidity 0.7.6;
// SPDX-License-Identifier: GPL-3.0-only
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol";
interface RocketVaultInterface {
function balanceOf(string memory _networkContractName) external view returns (uint256);
function depositEther() external payable;
function withdrawEther(uint256 _amount) external;
function depositToken(string memory _networkContractName, IERC20 _tokenAddress, uint256 _amount) external;
function withdrawToken(address _withdrawalAddress, IERC20 _tokenAddress, uint256 _amount) external;
function balanceOfToken(string memory _networkContractName, IERC20 _tokenAddress) external view returns (uint256);
function transferToken(string memory _networkContractName, IERC20 _tokenAddress, uint256 _amount) external;
function burnToken(ERC20Burnable _tokenAddress, uint256 _amount) external;
}/**
* .
* / \
* |.'.|
* |'.'|
* ,'| |`.
* |,-'-|-'-.|
* __|_| | _ _ _____ _
* | ___ \| | | | | | ___ \ | |
* | |_/ /|__ ___| | _____| |_ | |_/ /__ ___ | |
* | // _ \ / __| |/ / _ \ __| | __/ _ \ / _ \| |
* | |\ \ (_) | (__| < __/ |_ | | | (_) | (_) | |
* \_| \_\___/ \___|_|\_\___|\__| \_| \___/ \___/|_|
* +---------------------------------------------------+
* | DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0 |
* +---------------------------------------------------+
*
* Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned,
* decentralised, trustless and compatible with staking in Ethereum 2.0.
*
* For more information about Rocket Pool, visit https://rocketpool.net
*
* Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty
*
*/
pragma solidity 0.7.6;
// SPDX-License-Identifier: GPL-3.0-only
interface RocketVaultWithdrawerInterface {
function receiveVaultWithdrawalETH() external payable;
}/**
* .
* / \
* |.'.|
* |'.'|
* ,'| |`.
* |,-'-|-'-.|
* __|_| | _ _ _____ _
* | ___ \| | | | | | ___ \ | |
* | |_/ /|__ ___| | _____| |_ | |_/ /__ ___ | |
* | // _ \ / __| |/ / _ \ __| | __/ _ \ / _ \| |
* | |\ \ (_) | (__| < __/ |_ | | | (_) | (_) | |
* \_| \_\___/ \___|_|\_\___|\__| \_| \___/ \___/|_|
* +---------------------------------------------------+
* | 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 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.7.6;
pragma abicoder v2;
// SPDX-License-Identifier: GPL-3.0-only
interface RocketRewardsRelayInterface {
function relayRewards(uint256 _intervalIndex, bytes32 _merkleRoot, uint256 _rewardsRPL, uint256 _rewardsETH) external;
function claim(address _nodeAddress, uint256[] calldata _intervalIndex, uint256[] calldata _amountRPL, uint256[] calldata _amountETH, bytes32[][] calldata _merkleProof) external;
function claimAndStake(address _nodeAddress, uint256[] calldata _intervalIndex, uint256[] calldata _amountRPL, uint256[] calldata _amountETH, bytes32[][] calldata _merkleProof, uint256 _stakeAmount) external;
function isClaimed(uint256 _intervalIndex, address _claimer) 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.7.6;
pragma abicoder v2;
// SPDX-License-Identifier: GPL-3.0-only
interface RocketSmoothingPoolInterface {
function withdrawEther(address _to, uint256 _amount) external;
}/**
* .
* / \
* |.'.|
* |'.'|
* ,'| |`.
* |,-'-|-'-.|
* __|_| | _ _ _____ _
* | ___ \| | | | | | ___ \ | |
* | |_/ /|__ ___| | _____| |_ | |_/ /__ ___ | |
* | // _ \ / __| |/ / _ \ __| | __/ _ \ / _ \| |
* | |\ \ (_) | (__| < __/ |_ | | | (_) | (_) | |
* \_| \_\___/ \___|_|\_\___|\__| \_| \___/ \___/|_|
* +---------------------------------------------------+
* | DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0 |
* +---------------------------------------------------+
*
* Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned,
* decentralised, trustless and compatible with staking in Ethereum 2.0.
*
* For more information about Rocket Pool, visit https://rocketpool.net
*
* Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty
*
*/
pragma solidity 0.7.6;
// SPDX-License-Identifier: GPL-3.0-only
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
interface RocketTokenRPLInterface is IERC20 {
function getInflationCalcTime() external view returns(uint256);
function getInflationIntervalTime() external view returns(uint256);
function getInflationIntervalRate() external view returns(uint256);
function getInflationIntervalsPassed() external view returns(uint256);
function getInflationIntervalStartTime() external view returns(uint256);
function getInflationRewardsContractAddress() external view returns(address);
function inflationCalculate() external view returns (uint256);
function inflationMintTokens() external returns (uint256);
function swapTokens(uint256 _amount) external;
}{
"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":"claimer","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"rewardIndex","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"amountRPL","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"amountETH","type":"uint256[]"}],"name":"RewardsClaimed","type":"event"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"},{"internalType":"uint256[]","name":"_rewardIndex","type":"uint256[]"},{"internalType":"uint256[]","name":"_amountRPL","type":"uint256[]"},{"internalType":"uint256[]","name":"_amountETH","type":"uint256[]"},{"internalType":"bytes32[][]","name":"_merkleProof","type":"bytes32[][]"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"},{"internalType":"uint256[]","name":"_rewardIndex","type":"uint256[]"},{"internalType":"uint256[]","name":"_amountRPL","type":"uint256[]"},{"internalType":"uint256[]","name":"_amountETH","type":"uint256[]"},{"internalType":"bytes32[][]","name":"_merkleProof","type":"bytes32[][]"},{"internalType":"uint256","name":"_stakeAmount","type":"uint256"}],"name":"claimAndStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rewardIndex","type":"uint256"},{"internalType":"address","name":"_claimer","type":"address"}],"name":"isClaimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"receiveVaultWithdrawalETH","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rewardIndex","type":"uint256"},{"internalType":"bytes32","name":"_root","type":"bytes32"},{"internalType":"uint256","name":"_rewardsRPL","type":"uint256"},{"internalType":"uint256","name":"_rewardsETH","type":"uint256"}],"name":"relayRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]Contract Creation Code
60c060405260008054610100600160a81b03191690553480156200002257600080fd5b5060405162001e5b38038062001e5b8339810160408190526200004591620000c9565b600080546001610100600160a81b03199091166101006001600160a01b038516021760ff19161790556040516200007f906020016200012c565b60408051601f19818403018152908290528051602091820120608052620000a79101620000f9565b60408051601f19818403018152919052805160209091012060a052506200015c565b600060208284031215620000db578081fd5b81516001600160a01b0381168114620000f2578182fd5b9392505050565b6f636f6e74726163742e6164647265737360801b81526d1c9bd8dad95d151bdad95b94941360921b6010820152601e0190565b6f636f6e74726163742e6164647265737360801b81526a1c9bd8dad95d15985d5b1d60aa1b6010820152601b0190565b60805160a051611cd16200018a600039806101ea5280610bd15250806101bd5280610b365250611cd16000f3fe6080604052600436106100695760003560e01c8063d2ef079511610043578063d2ef0795146100ca578063dacfffa8146100f7578063e44ba18f1461011757610070565b806354fd4d50146100755780635e38c572146100a0578063c095415d146100c257610070565b3661007057005b600080fd5b34801561008157600080fd5b5061008a610137565b6040516100979190611c03565b60405180910390f35b3480156100ac57600080fd5b506100c06100bb366004611616565b610140565b005b6100c061015e565b3480156100d657600080fd5b506100ea6100e53660046117e6565b610160565b6040516100979190611a25565b34801561010357600080fd5b506100c06101123660046116ea565b6101b6565b34801561012357600080fd5b506100c0610132366004611815565b61080c565b60005460ff1681565b61015389898989898989898960006101b6565b505050505050505050565b565b60405160009061010084049060ff85169083906101a2906101879087908690602001611906565b60405160208183030381529060405280519060200120610d33565b600190921b91821690911495945050505050565b60006101e17f0000000000000000000000000000000000000000000000000000000000000000610ddb565b9050600061020e7f0000000000000000000000000000000000000000000000000000000000000000610ddb565b90506102218b8b8e8c8c8c8c8c8c610e4f565b60008060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635b49ff628e6040518263ffffffff1660e01b815260040161027d9190611964565b60206040518083038186803b15801561029557600080fd5b505afa1580156102a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102cd91906115fa565b90503373ffffffffffffffffffffffffffffffffffffffff8e16148061030857503373ffffffffffffffffffffffffffffffffffffffff8216145b610347576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161033e90611a30565b60405180910390fd5b60008060005b8d8110156103ab5761037a8d8d8381811061036457fe5b90506020020135846110c890919063ffffffff16565b92506103a18b8b8381811061038b57fe5b90506020020135836110c890919063ffffffff16565b915060010161034d565b50818611156103e6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161033e90611b8c565b60006103f28388611143565b90508015610483576040517f01e3366700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8716906301e336679061045090879089908690600401611985565b600060405180830381600087803b15801561046a57600080fd5b505af115801561047e573d6000803e3d6000fd5b505050505b81156105b2576040517f3bed33ce00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff871690633bed33ce906104db908590600401611bfa565b600060405180830381600087803b1580156104f557600080fd5b505af1158015610509573d6000803e3d6000fd5b5050505060008473ffffffffffffffffffffffffffffffffffffffff168360405161053390611961565b60006040518083038185875af1925050503d8060008114610570576040519150601f19603f3d011682016040523d82523d6000602084013e610575565b606091505b50509050806105b0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161033e90611b1e565b505b5050505060008311156107a657600081905060006106046040518060400160405280601181526020017f726f636b65744e6f64655374616b696e670000000000000000000000000000008152506111ba565b6040517f01e3366700000000000000000000000000000000000000000000000000000000815290915073ffffffffffffffffffffffffffffffffffffffff8516906301e336679061065d90309087908a90600401611985565b600060405180830381600087803b15801561067757600080fd5b505af115801561068b573d6000803e3d6000fd5b50506040517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8516925063095ea7b391506106e390849089906004016119b6565b602060405180830381600087803b1580156106fd57600080fd5b505af1158015610711573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061073591906117c6565b508073ffffffffffffffffffffffffffffffffffffffff1663cb1c83218f876040518363ffffffff1660e01b81526004016107719291906119b6565b600060405180830381600087803b15801561078b57600080fd5b505af115801561079f573d6000803e3d6000fd5b5050505050505b8b73ffffffffffffffffffffffffffffffffffffffff167fa95ccb6ea843871c0e81afc0fa4387c0bb5b36ad97007a97b3ea802f443c5a178c8c8c8c8c8c6040516107f6969594939291906119dc565b60405180910390a2505050505050505050505050565b6040518060400160405280601e81526020017f726f636b65744d65726b6c654469737472696275746f724d61696e6e65740000815250306108ff8260405160200180807f636f6e74726163742e616464726573730000000000000000000000000000000081525060100182805190602001908083835b602083106108bf57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610882565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405280519060200120610ddb565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461099857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b6040518060400160405280601181526020017f726f636b657452657761726473506f6f6c00000000000000000000000000000081525033610a4a8260405160200180807f636f6e74726163742e61646472657373000000000000000000000000000000008152506010018280519060200190808383602083106108bf57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610882565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610ae357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b600088604051602001610af691906118d5565b6040516020818303038152906040528051906020012090506000801b610b1b826112c2565b14610b2557600080fd5b610b2f8189611336565b6000610b5a7f0000000000000000000000000000000000000000000000000000000000000000610ddb565b90508615610bc4578073ffffffffffffffffffffffffffffffffffffffff166398ea5fca886040518263ffffffff1660e01b81526004016000604051808303818588803b158015610baa57600080fd5b505af1158015610bbe573d6000803e3d6000fd5b50505050505b8715610d27576000610bf57f0000000000000000000000000000000000000000000000000000000000000000610ddb565b6040517f095ea7b300000000000000000000000000000000000000000000000000000000815290915073ffffffffffffffffffffffffffffffffffffffff82169063095ea7b390610c4c9085908d906004016119b6565b602060405180830381600087803b158015610c6657600080fd5b505af1158015610c7a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c9e91906117c6565b506040517ff444295800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83169063f444295890610cf39084908d90600401611ac4565b600060405180830381600087803b158015610d0d57600080fd5b505af1158015610d21573d6000803e3d6000fd5b50505050505b50505050505050505050565b60008060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663bd02d0f5836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610da757600080fd5b505afa158015610dbb573d6000803e3d6000fd5b505050506040513d6020811015610dd157600080fd5b505190505b919050565b60008060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166321f8a721836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610da757600080fd5b60006101008a8a6000818110610e6157fe5b9050602002013581610e6f57fe5b04905060008882604051602001610e87929190611906565b6040516020818303038152906040528051906020012090506000610eaa82610d33565b905060005b8b8110156110af5760008a8a83818110610ec557fe5b905060200201351180610eea57506000888883818110610ee157fe5b90506020020135115b610f20576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161033e90611a8d565b6101008d8d83818110610f2f57fe5b9050602002013581610f3d57fe5b048414610fa557610f4e83836113cb565b6101008d8d83818110610f5d57fe5b9050602002013581610f6b57fe5b0493508a84604051602001610f81929190611906565b604051602081830303815290604052805190602001209250610fa283610d33565b91505b60006101008e8e84818110610fb657fe5b9050602002013581610fc457fe5b0690506001811b838116811415611007576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161033e90611b55565b6110678f8f8581811061101657fe5b905060200201358e8e8e8781811061102a57fe5b905060200201358d8d8881811061103d57fe5b905060200201358c8c8981811061105057fe5b90506020028101906110629190611c11565b611444565b61109d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161033e90611bc3565b5060019081901b929092179101610eaf565b506110ba82826113cb565b505050505050505050505050565b60008282018381101561113c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6000828211156111b457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6000806112388360405160200180807f636f6e74726163742e61646472657373000000000000000000000000000000008152506010018280519060200190808383602083106108bf57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610882565b905073ffffffffffffffffffffffffffffffffffffffff81166112bc57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f436f6e7472616374206e6f7420666f756e640000000000000000000000000000604482015290519081900360640190fd5b92915050565b60008060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a6ed563e836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610da757600080fd5b60008054604080517f4e91db080000000000000000000000000000000000000000000000000000000081526004810186905260248101859052905161010090920473ffffffffffffffffffffffffffffffffffffffff1692634e91db089260448084019382900301818387803b1580156113af57600080fd5b505af11580156113c3573d6000803e3d6000fd5b505050505050565b60008054604080517fe2a4853a0000000000000000000000000000000000000000000000000000000081526004810186905260248101859052905161010090920473ffffffffffffffffffffffffffffffffffffffff169263e2a4853a9260448084019382900301818387803b1580156113af57600080fd5b600080866000878760405160200161145f9493929190611893565b60405160208183030381529060405280519060200120905060008860405160200161148a91906118d5565b60405160208183030381529060405280519060200120905060006114ad826112c2565b90506114ef8686808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508592508791506114fd9050565b9a9950505050505050505050565b600081815b855181101561159b57600086828151811061151957fe5b602002602001015190508083116115605782816040516020018083815260200182815260200192505050604051602081830303815290604052805190602001209250611592565b808360405160200180838152602001828152602001925050506040516020818303038152906040528051906020012092505b50600101611502565b509092149392505050565b8035610dd681611c76565b60008083601f8401126115c2578182fd5b50813567ffffffffffffffff8111156115d9578182fd5b60208301915083602080830285010111156115f357600080fd5b9250929050565b60006020828403121561160b578081fd5b815161113c81611c76565b600080600080600080600080600060a08a8c031215611633578485fd5b893561163e81611c76565b985060208a013567ffffffffffffffff8082111561165a578687fd5b6116668d838e016115b1565b909a50985060408c013591508082111561167e578687fd5b61168a8d838e016115b1565b909850965060608c01359150808211156116a2578586fd5b6116ae8d838e016115b1565b909650945060808c01359150808211156116c6578384fd5b506116d38c828d016115b1565b915080935050809150509295985092959850929598565b60008060008060008060008060008060c08b8d031215611708578081fd5b6117118b6115a6565b995060208b013567ffffffffffffffff8082111561172d578283fd5b6117398e838f016115b1565b909b50995060408d0135915080821115611751578283fd5b61175d8e838f016115b1565b909950975060608d0135915080821115611775578283fd5b6117818e838f016115b1565b909750955060808d0135915080821115611799578283fd5b506117a68d828e016115b1565b9150809450508092505060a08b013590509295989b9194979a5092959850565b6000602082840312156117d7578081fd5b8151801515811461113c578182fd5b600080604083850312156117f8578182fd5b82359150602083013561180a81611c76565b809150509250929050565b6000806000806080858703121561182a578384fd5b5050823594602084013594506040840135936060013592509050565b60008284527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831115611877578081fd5b6020830280836020870137939093016020019283525090919050565b60609490941b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016845260148401929092526034830152605482015260740190565b7f726577617264732e6d65726b6c652e726f6f74000000000000000000000000008152601381019190915260330190565b7f726577617264732e696e74657276616c2e636c61696d65640000000000000000815260609290921b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166018830152602c820152604c0190565b90565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff9384168152919092166020820152604081019190915260600190565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b6000606082526119f060608301888a611846565b8281036020840152611a03818789611846565b90508281036040840152611a18818587611846565b9998505050505050505050565b901515815260200190565b6020808252602e908201527f43616e206f6e6c7920636c61696d2066726f6d206e6f6465206f72207769746860408201527f64726177616c2061646472657373000000000000000000000000000000000000606082015260800190565b6020808252600e908201527f496e76616c696420616d6f756e74000000000000000000000000000000000000604082015260600190565b6060808252601e908201527f726f636b65744d65726b6c654469737472696275746f724d61696e6e65740000608082015273ffffffffffffffffffffffffffffffffffffffff929092166020830152604082015260a00190565b60208082526013908201527f4661696c656420746f20636c61696d2045544800000000000000000000000000604082015260600190565b6020808252600f908201527f416c726561647920636c61696d65640000000000000000000000000000000000604082015260600190565b60208082526014908201527f496e76616c6964207374616b6520616d6f756e74000000000000000000000000604082015260600190565b6020808252600d908201527f496e76616c69642070726f6f6600000000000000000000000000000000000000604082015260600190565b90815260200190565b60ff91909116815260200190565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112611c45578283fd5b83018035915067ffffffffffffffff821115611c5f578283fd5b60209081019250810236038213156115f357600080fd5b73ffffffffffffffffffffffffffffffffffffffff81168114611c9857600080fd5b5056fea264697066735822122083cb2747aab02df96ab391c123ec045cdac51497a3c8d823f1a3fff7d838875864736f6c634300070600330000000000000000000000001d8f8f00cfa6758d7be78336684788fb0ee0fa46
Deployed Bytecode
0x6080604052600436106100695760003560e01c8063d2ef079511610043578063d2ef0795146100ca578063dacfffa8146100f7578063e44ba18f1461011757610070565b806354fd4d50146100755780635e38c572146100a0578063c095415d146100c257610070565b3661007057005b600080fd5b34801561008157600080fd5b5061008a610137565b6040516100979190611c03565b60405180910390f35b3480156100ac57600080fd5b506100c06100bb366004611616565b610140565b005b6100c061015e565b3480156100d657600080fd5b506100ea6100e53660046117e6565b610160565b6040516100979190611a25565b34801561010357600080fd5b506100c06101123660046116ea565b6101b6565b34801561012357600080fd5b506100c0610132366004611815565b61080c565b60005460ff1681565b61015389898989898989898960006101b6565b505050505050505050565b565b60405160009061010084049060ff85169083906101a2906101879087908690602001611906565b60405160208183030381529060405280519060200120610d33565b600190921b91821690911495945050505050565b60006101e17f41c30d91bfaf5fa8d610263b0554366f2159a2b6807bf2fdbeb8f2b21a62f17b610ddb565b9050600061020e7f1b80652f417157fe4774177f7d33c8b600483b9193e3f00d2ab1ace8fa6bdc9c610ddb565b90506102218b8b8e8c8c8c8c8c8c610e4f565b60008060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635b49ff628e6040518263ffffffff1660e01b815260040161027d9190611964565b60206040518083038186803b15801561029557600080fd5b505afa1580156102a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102cd91906115fa565b90503373ffffffffffffffffffffffffffffffffffffffff8e16148061030857503373ffffffffffffffffffffffffffffffffffffffff8216145b610347576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161033e90611a30565b60405180910390fd5b60008060005b8d8110156103ab5761037a8d8d8381811061036457fe5b90506020020135846110c890919063ffffffff16565b92506103a18b8b8381811061038b57fe5b90506020020135836110c890919063ffffffff16565b915060010161034d565b50818611156103e6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161033e90611b8c565b60006103f28388611143565b90508015610483576040517f01e3366700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8716906301e336679061045090879089908690600401611985565b600060405180830381600087803b15801561046a57600080fd5b505af115801561047e573d6000803e3d6000fd5b505050505b81156105b2576040517f3bed33ce00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff871690633bed33ce906104db908590600401611bfa565b600060405180830381600087803b1580156104f557600080fd5b505af1158015610509573d6000803e3d6000fd5b5050505060008473ffffffffffffffffffffffffffffffffffffffff168360405161053390611961565b60006040518083038185875af1925050503d8060008114610570576040519150601f19603f3d011682016040523d82523d6000602084013e610575565b606091505b50509050806105b0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161033e90611b1e565b505b5050505060008311156107a657600081905060006106046040518060400160405280601181526020017f726f636b65744e6f64655374616b696e670000000000000000000000000000008152506111ba565b6040517f01e3366700000000000000000000000000000000000000000000000000000000815290915073ffffffffffffffffffffffffffffffffffffffff8516906301e336679061065d90309087908a90600401611985565b600060405180830381600087803b15801561067757600080fd5b505af115801561068b573d6000803e3d6000fd5b50506040517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8516925063095ea7b391506106e390849089906004016119b6565b602060405180830381600087803b1580156106fd57600080fd5b505af1158015610711573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061073591906117c6565b508073ffffffffffffffffffffffffffffffffffffffff1663cb1c83218f876040518363ffffffff1660e01b81526004016107719291906119b6565b600060405180830381600087803b15801561078b57600080fd5b505af115801561079f573d6000803e3d6000fd5b5050505050505b8b73ffffffffffffffffffffffffffffffffffffffff167fa95ccb6ea843871c0e81afc0fa4387c0bb5b36ad97007a97b3ea802f443c5a178c8c8c8c8c8c6040516107f6969594939291906119dc565b60405180910390a2505050505050505050505050565b6040518060400160405280601e81526020017f726f636b65744d65726b6c654469737472696275746f724d61696e6e65740000815250306108ff8260405160200180807f636f6e74726163742e616464726573730000000000000000000000000000000081525060100182805190602001908083835b602083106108bf57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610882565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405280519060200120610ddb565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461099857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b6040518060400160405280601181526020017f726f636b657452657761726473506f6f6c00000000000000000000000000000081525033610a4a8260405160200180807f636f6e74726163742e61646472657373000000000000000000000000000000008152506010018280519060200190808383602083106108bf57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610882565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610ae357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b600088604051602001610af691906118d5565b6040516020818303038152906040528051906020012090506000801b610b1b826112c2565b14610b2557600080fd5b610b2f8189611336565b6000610b5a7f41c30d91bfaf5fa8d610263b0554366f2159a2b6807bf2fdbeb8f2b21a62f17b610ddb565b90508615610bc4578073ffffffffffffffffffffffffffffffffffffffff166398ea5fca886040518263ffffffff1660e01b81526004016000604051808303818588803b158015610baa57600080fd5b505af1158015610bbe573d6000803e3d6000fd5b50505050505b8715610d27576000610bf57f1b80652f417157fe4774177f7d33c8b600483b9193e3f00d2ab1ace8fa6bdc9c610ddb565b6040517f095ea7b300000000000000000000000000000000000000000000000000000000815290915073ffffffffffffffffffffffffffffffffffffffff82169063095ea7b390610c4c9085908d906004016119b6565b602060405180830381600087803b158015610c6657600080fd5b505af1158015610c7a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c9e91906117c6565b506040517ff444295800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83169063f444295890610cf39084908d90600401611ac4565b600060405180830381600087803b158015610d0d57600080fd5b505af1158015610d21573d6000803e3d6000fd5b50505050505b50505050505050505050565b60008060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663bd02d0f5836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610da757600080fd5b505afa158015610dbb573d6000803e3d6000fd5b505050506040513d6020811015610dd157600080fd5b505190505b919050565b60008060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166321f8a721836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610da757600080fd5b60006101008a8a6000818110610e6157fe5b9050602002013581610e6f57fe5b04905060008882604051602001610e87929190611906565b6040516020818303038152906040528051906020012090506000610eaa82610d33565b905060005b8b8110156110af5760008a8a83818110610ec557fe5b905060200201351180610eea57506000888883818110610ee157fe5b90506020020135115b610f20576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161033e90611a8d565b6101008d8d83818110610f2f57fe5b9050602002013581610f3d57fe5b048414610fa557610f4e83836113cb565b6101008d8d83818110610f5d57fe5b9050602002013581610f6b57fe5b0493508a84604051602001610f81929190611906565b604051602081830303815290604052805190602001209250610fa283610d33565b91505b60006101008e8e84818110610fb657fe5b9050602002013581610fc457fe5b0690506001811b838116811415611007576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161033e90611b55565b6110678f8f8581811061101657fe5b905060200201358e8e8e8781811061102a57fe5b905060200201358d8d8881811061103d57fe5b905060200201358c8c8981811061105057fe5b90506020028101906110629190611c11565b611444565b61109d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161033e90611bc3565b5060019081901b929092179101610eaf565b506110ba82826113cb565b505050505050505050505050565b60008282018381101561113c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6000828211156111b457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6000806112388360405160200180807f636f6e74726163742e61646472657373000000000000000000000000000000008152506010018280519060200190808383602083106108bf57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610882565b905073ffffffffffffffffffffffffffffffffffffffff81166112bc57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f436f6e7472616374206e6f7420666f756e640000000000000000000000000000604482015290519081900360640190fd5b92915050565b60008060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a6ed563e836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610da757600080fd5b60008054604080517f4e91db080000000000000000000000000000000000000000000000000000000081526004810186905260248101859052905161010090920473ffffffffffffffffffffffffffffffffffffffff1692634e91db089260448084019382900301818387803b1580156113af57600080fd5b505af11580156113c3573d6000803e3d6000fd5b505050505050565b60008054604080517fe2a4853a0000000000000000000000000000000000000000000000000000000081526004810186905260248101859052905161010090920473ffffffffffffffffffffffffffffffffffffffff169263e2a4853a9260448084019382900301818387803b1580156113af57600080fd5b600080866000878760405160200161145f9493929190611893565b60405160208183030381529060405280519060200120905060008860405160200161148a91906118d5565b60405160208183030381529060405280519060200120905060006114ad826112c2565b90506114ef8686808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508592508791506114fd9050565b9a9950505050505050505050565b600081815b855181101561159b57600086828151811061151957fe5b602002602001015190508083116115605782816040516020018083815260200182815260200192505050604051602081830303815290604052805190602001209250611592565b808360405160200180838152602001828152602001925050506040516020818303038152906040528051906020012092505b50600101611502565b509092149392505050565b8035610dd681611c76565b60008083601f8401126115c2578182fd5b50813567ffffffffffffffff8111156115d9578182fd5b60208301915083602080830285010111156115f357600080fd5b9250929050565b60006020828403121561160b578081fd5b815161113c81611c76565b600080600080600080600080600060a08a8c031215611633578485fd5b893561163e81611c76565b985060208a013567ffffffffffffffff8082111561165a578687fd5b6116668d838e016115b1565b909a50985060408c013591508082111561167e578687fd5b61168a8d838e016115b1565b909850965060608c01359150808211156116a2578586fd5b6116ae8d838e016115b1565b909650945060808c01359150808211156116c6578384fd5b506116d38c828d016115b1565b915080935050809150509295985092959850929598565b60008060008060008060008060008060c08b8d031215611708578081fd5b6117118b6115a6565b995060208b013567ffffffffffffffff8082111561172d578283fd5b6117398e838f016115b1565b909b50995060408d0135915080821115611751578283fd5b61175d8e838f016115b1565b909950975060608d0135915080821115611775578283fd5b6117818e838f016115b1565b909750955060808d0135915080821115611799578283fd5b506117a68d828e016115b1565b9150809450508092505060a08b013590509295989b9194979a5092959850565b6000602082840312156117d7578081fd5b8151801515811461113c578182fd5b600080604083850312156117f8578182fd5b82359150602083013561180a81611c76565b809150509250929050565b6000806000806080858703121561182a578384fd5b5050823594602084013594506040840135936060013592509050565b60008284527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831115611877578081fd5b6020830280836020870137939093016020019283525090919050565b60609490941b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016845260148401929092526034830152605482015260740190565b7f726577617264732e6d65726b6c652e726f6f74000000000000000000000000008152601381019190915260330190565b7f726577617264732e696e74657276616c2e636c61696d65640000000000000000815260609290921b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166018830152602c820152604c0190565b90565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff9384168152919092166020820152604081019190915260600190565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b6000606082526119f060608301888a611846565b8281036020840152611a03818789611846565b90508281036040840152611a18818587611846565b9998505050505050505050565b901515815260200190565b6020808252602e908201527f43616e206f6e6c7920636c61696d2066726f6d206e6f6465206f72207769746860408201527f64726177616c2061646472657373000000000000000000000000000000000000606082015260800190565b6020808252600e908201527f496e76616c696420616d6f756e74000000000000000000000000000000000000604082015260600190565b6060808252601e908201527f726f636b65744d65726b6c654469737472696275746f724d61696e6e65740000608082015273ffffffffffffffffffffffffffffffffffffffff929092166020830152604082015260a00190565b60208082526013908201527f4661696c656420746f20636c61696d2045544800000000000000000000000000604082015260600190565b6020808252600f908201527f416c726561647920636c61696d65640000000000000000000000000000000000604082015260600190565b60208082526014908201527f496e76616c6964207374616b6520616d6f756e74000000000000000000000000604082015260600190565b6020808252600d908201527f496e76616c69642070726f6f6600000000000000000000000000000000000000604082015260600190565b90815260200190565b60ff91909116815260200190565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112611c45578283fd5b83018035915067ffffffffffffffff821115611c5f578283fd5b60209081019250810236038213156115f357600080fd5b73ffffffffffffffffffffffffffffffffffffffff81168114611c9857600080fd5b5056fea264697066735822122083cb2747aab02df96ab391c123ec045cdac51497a3c8d823f1a3fff7d838875864736f6c63430007060033
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
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.