Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Sidu28 committed Nov 29, 2023
1 parent d290f04 commit 59a328d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
4 changes: 1 addition & 3 deletions src/contracts/interfaces/IEigenPod.sol
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ interface IEigenPod {

struct ProofService {
address caller;
// whether or not the proof fulfiller is allowed to fulfill proofs
bool permission;
// whether or not the proof fulfiller has been added
uint256 maxFee;
// the commission rate of the proof fulfiller
Expand Down Expand Up @@ -230,6 +228,6 @@ interface IEigenPod {
/// @notice called by owner of a pod to remove any ERC20s deposited in the pod
function recoverTokens(IERC20[] memory tokenList, uint256[] memory amountsToWithdraw, address recipient) external;

function updateProofService(address fulfiller, bool permission, uint256 feeBips, address feeRecipient) external;
function updateProofService(address fulfiller, uint256 feeBips, address feeRecipient) external;

}
12 changes: 4 additions & 8 deletions src/contracts/pods/EigenPod.sol
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ contract EigenPod is IEigenPod, Initializable, ReentrancyGuardUpgradeable, Eigen
*/
uint256 internal constant VERIFY_BALANCE_UPDATE_WINDOW_SECONDS = 4.5 hours;

uint256 internal constant MAX_BIPS = 10000;

/// @notice This is the beacon chain deposit contract
IETHPOSDeposit public immutable ethPOS;

Expand Down Expand Up @@ -469,15 +467,13 @@ contract EigenPod is IEigenPod, Initializable, ReentrancyGuardUpgradeable, Eigen
}


function updateProofService(address caller, bool permission, uint256 feeBips, address feeRecipient) external onlyEigenPodManager {
require(feeBips <= MAX_BIPS, "BIPS value out of range");
function updateProofService(address caller, uint256 maxFee, address feeRecipient) external onlyEigenPodManager {
proofService = ProofService({
caller: caller,
permission: permission,
feeBips: feeBips,
maxFee: maxFee,
feeRecipient: feeRecipient
});
emit ProofServiceUpdated(fulfiller);
emit ProofServiceUpdated(proofService.caller);
}


Expand All @@ -496,7 +492,7 @@ contract EigenPod is IEigenPod, Initializable, ReentrancyGuardUpgradeable, Eigen
if(withdrawalProvenUntilTimestamp == 0){
withdrawalProvenUntilTimestamp = GENESIS_TIME;
}
require(startTimestamp < endTimestamp, "EigenPod.fulfillPartialWithdrawalProofRequest: startTimestamp must precede endTimestamp")
require(startTimestamp < endTimestamp, "EigenPod.fulfillPartialWithdrawalProofRequest: startTimestamp must precede endTimestamp");
require(startTimestamp == withdrawalProvenUntilTimestamp, "EigenPod.fulfillPartialWithdrawalProofRequest: startTimestamp must match withdrawalProvenUntilTimestamp");
require(requestor == podOwner, "EigenPod.fulfillPartialWithdrawalProofRequest: requestor must be podOwner");
require(fee <= proofService.maxFee, "EigenPod.fulfillPartialWithdrawalProofRequest: fee must be less than or equal to maxFee");
Expand Down
2 changes: 1 addition & 1 deletion src/test/mocks/EigenPodMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,5 @@ contract EigenPodMock is IEigenPod, Test {
/// @notice called by owner of a pod to remove any ERC20s deposited in the pod
function recoverTokens(IERC20[] memory tokenList, uint256[] memory amountsToWithdraw, address recipient) external {}

function updateProofService(address fulfiller, bool permission, uint256 feeBips, address feeRecipient) external{}
function updateProofService(address fulfiller, uint256 feeBips, address feeRecipient) external{}
}

0 comments on commit 59a328d

Please sign in to comment.