Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions protocol-contracts/staking/contracts/OperatorRewarder.sol
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ contract OperatorRewarder {
uint256 private _lastClaimTotalAssetsPlusPaidRewards;
uint256 private _totalRewardsPaid;
int256 private _totalVirtualRewardsPaid;
mapping(address => int256) private _rewardsPaid;
mapping(address => address) private _authorizedClaimers;
mapping(address receiver => int256 rewardsPaid) private _rewardsPaid;
mapping(address receiver => address claimer) private _authorizedClaimers;

/// @notice Emitted when the beneficiary is transferred.
event BeneficiaryTransferred(address oldBeneficiary, address newBeneficiary);
Expand Down Expand Up @@ -144,14 +144,14 @@ contract OperatorRewarder {
* @notice Claims rewards for a delegator. The caller must be authorized to claim rewards on
* behalf of the delegator. By default, the caller is authorized to claim rewards on behalf of
* themselves.
* @param account The delegator's address.
* @param receiver The delegator's address that will receive the rewards.
*/
function claimRewards(address account) public virtual onlyClaimer(account) {
uint256 earned_ = earned(account);
function claimRewards(address receiver) public virtual onlyClaimer(receiver) {
uint256 earned_ = earned(receiver);
if (earned_ > 0) {
_rewardsPaid[account] += SafeCast.toInt256(earned_);
_rewardsPaid[receiver] += SafeCast.toInt256(earned_);
_totalRewardsPaid += earned_;
_doTransferOut(account, earned_);
_doTransferOut(receiver, earned_);
}
}

Expand Down
6 changes: 3 additions & 3 deletions protocol-contracts/staking/contracts/OperatorStaking.sol
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ contract OperatorStaking is ERC1363Upgradeable, ReentrancyGuardTransient, UUPSUp
IERC20 _asset;
address _rewarder;
uint256 _totalSharesInRedemption;
mapping(address => uint256) _sharesReleased;
mapping(address => Checkpoints.Trace208) _redeemRequests;
mapping(address => mapping(address => bool)) _operator;
mapping(address controller => uint256 sharesReleased) _sharesReleased;
mapping(address controller => Checkpoints.Trace208 redeemRequests) _redeemRequests;
mapping(address controller => mapping(address operator => bool approved)) _operator;
}

// keccak256(abi.encode(uint256(keccak256("fhevm_protocol.storage.OperatorStaking")) - 1)) & ~bytes32(uint256(0xff))
Expand Down